Skip to content

Update Issue Template #55

Update Issue Template

Update Issue Template #55

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