Prune past conferences #2
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: Prune past conferences | |
| # Deterministically drops conferences whose end date has passed and commits the | |
| # result. Runs weekly and can be triggered by hand from the Actions tab. | |
| on: | |
| schedule: | |
| - cron: "0 7 * * 1" # 07:00 UTC every Monday | |
| workflow_dispatch: | |
| permissions: | |
| contents: write | |
| jobs: | |
| prune: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.12" | |
| - name: Prune | |
| run: python scripts/prune.py | |
| - name: Commit changes | |
| run: | | |
| if [[ -n "$(git status --porcelain data/conferences.json)" ]]; then | |
| git config user.name "github-actions[bot]" | |
| git config user.email "github-actions[bot]@users.noreply.github.com" | |
| git add data/conferences.json | |
| git commit -m "Prune past conferences [skip ci]" | |
| git push | |
| else | |
| echo "No changes to commit." | |
| fi |