-
Notifications
You must be signed in to change notification settings - Fork 8
51 lines (44 loc) · 1.44 KB
/
merge-autogenerated-content.yml
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
51
name: Merge generated content updates
# Trigger by cronjob
on:
schedule:
# Merge the PR every Friday at 10:00 UTC
- cron: "0 10 * * FRI"
workflow_dispatch: {} # Allow manual triggering
jobs:
merge-autogenerated-content:
runs-on: ubuntu-latest
permissions:
checks: read
contents: write
pull-requests: write
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
ref: "automatic-update-of-generated-content"
fetch-depth: 0
- name: Update self-generated content branch with main branch changes
uses: prompt/actions-merge-branch@v2
with:
from: "origin/main"
- name: Find Pull Request
uses: juliangruber/find-pull-request-action@v1
id: find-pull-request
with:
branch: automatic-update-of-generated-content
- name: Approve Pull Request
uses: juliangruber/approve-pull-request-action@v2
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
number: ${{ steps.find-pull-request.outputs.number }}
- name: GitHub Checks
uses: poseidon/[email protected]
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: Merge Pull Request
uses: juliangruber/merge-pull-request-action@v1
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
number: ${{ steps.find-pull-request.outputs.number }}
method: squash