Check for djifix.c updates #631
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: Check for djifix.c updates | |
| on: | |
| schedule: | |
| # Runs daily at midnight (UTC) | |
| - cron: '0 0 * * *' | |
| workflow_dispatch: | |
| permissions: | |
| contents: write | |
| pull-requests: write | |
| jobs: | |
| update-check: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Set up Git user | |
| run: | | |
| git config --global user.name "github-actions[bot]" | |
| git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com" | |
| - name: Update djifix.c | |
| run: make update | |
| - name: Check for changes in djifix.c | |
| id: changes | |
| run: | | |
| if git diff --quiet --exit-code djifix.c; then | |
| echo "No changes in djifix.c" | |
| echo "changed=false" >> "$GITHUB_OUTPUT" | |
| else | |
| echo "Changes detected in djifix.c" | |
| echo "changed=true" >> "$GITHUB_OUTPUT" | |
| fi | |
| - name: Get version | |
| id: version | |
| if: steps.changes.outputs.changed == 'true' | |
| run: | | |
| echo "version=$(make version)" >> "$GITHUB_OUTPUT" | |
| - name: Create pull request | |
| if: steps.changes.outputs.changed == 'true' | |
| uses: peter-evans/create-pull-request@v6 | |
| with: | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| base: master | |
| branch: update-djifix | |
| delete-branch: true | |
| commit-message: "Version ${{ steps.version.outputs.version }}" | |
| title: "Version ${{ steps.version.outputs.version }}" | |
| body: | | |
| Automated update for `djifix.c`. | |
| Source version: `${{ steps.version.outputs.version }}` | |
| Trigger: `${{ github.event_name }}` | |
| Run: `${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}` |