Create Pull Request for Badge Updates #17
This file contains hidden or 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: Create Pull Request for Badge Updates | |
| on: | |
| workflow_run: | |
| workflows: ["Check and Update Badges"] | |
| types: | |
| - completed | |
| jobs: | |
| create-pr: | |
| runs-on: ubuntu-22.04 | |
| permissions: | |
| contents: write | |
| steps: | |
| - name: Download branch name artifact | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: branch-name | |
| - name: Load branch name | |
| run: | | |
| BRANCH_NAME=$(cat branch-name.txt) | |
| echo "Loaded branch name: $BRANCH_NAME" | |
| echo "BRANCH_NAME=$BRANCH_NAME" >> $GITHUB_ENV | |
| - name: Checkout repository | |
| uses: actions/checkout@v3 | |
| with: | |
| ref: gh-pages | |
| fetch-depth: 0 | |
| - name: Create Pull Request | |
| if: ${{ github.event.workflow_run.conclusion == 'success' }} | |
| uses: peter-evans/create-pull-request@v5 | |
| with: | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| base: gh-pages | |
| branch: ${{ env.BRANCH_NAME }} | |
| title: "Update badges.json" | |
| body: | | |
| This pull request updates `badges.json` with the latest release URLs. | |
| Please review and merge if everything looks correct. | |
| labels: "automated update" | |
| assignees: "Garlicrot" |