-
Notifications
You must be signed in to change notification settings - Fork 0
50 lines (43 loc) · 1.42 KB
/
preview.yml
File metadata and controls
50 lines (43 loc) · 1.42 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
name: Preview Updater
on:
workflow_call:
inputs:
token:
type: string
required: false
default: ''
config:
type: string
description: Path to the preview configuration YAML file.
required: false
default: ''
readme:
type: string
description: Specifies the path to the README file.
required: false
default: ''
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: write
pull-requests: write
jobs:
Update:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Update banner
uses: TheDragonCode/github-preview-updater@v2
id: preview
with:
token: ${{ inputs.token || secrets.GITHUB_TOKEN }}
config: ${{ inputs.config }}
readme: ${{ inputs.readme }}
- name: Merge PR
if: steps.preview.outputs.pullRequestNumber != ''
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: gh pr merge --merge --delete-branch ${{ steps.preview.outputs.pullRequestNumber }}