Update Issue Template #55
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: Update Issue Template | |
| on: | |
| schedule: | |
| # Run daily at midnight UTC | |
| - cron: '0 0 * * *' | |
| push: | |
| paths: | |
| - 'achievements/*.json' | |
| branches: | |
| - main | |
| workflow_dispatch: | |
| jobs: | |
| update-template: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.11' | |
| - name: Update badge template | |
| run: | | |
| python scripts/update_badge_template.py | |
| - name: Check for changes | |
| id: check-changes | |
| run: | | |
| if git diff --quiet .github/ISSUE_TEMPLATE/badge-request.yml; then | |
| echo "changed=false" >> $GITHUB_OUTPUT | |
| else | |
| echo "changed=true" >> $GITHUB_OUTPUT | |
| fi | |
| - name: Commit and push | |
| if: steps.check-changes.outputs.changed == 'true' | |
| run: | | |
| git config user.name "github-actions[bot]" | |
| git config user.email "github-actions[bot]@users.noreply.github.com" | |
| git add .github/ISSUE_TEMPLATE/badge-request.yml | |
| git commit -m "Update badge request template for current year" | |
| git push |