Merge generated content updates #40
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |