Skip to content

update

update #3630

Workflow file for this run

name: update
on:
schedule:
- cron: '*/15 * * * *'
workflow_dispatch: {}
push:
branches: [main]
paths: ['tracker.py', '.github/workflows/update.yml']
permissions:
contents: write
concurrency:
group: update
cancel-in-progress: false
jobs:
update:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Install deps
run: pip install -r requirements.txt
- name: Run tracker
id: tracker
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: python tracker.py
- name: Commit and push if changed
run: |
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git add -A
if git diff --cached --quiet; then
echo "No changes to commit"
exit 0
fi
MSG="${{ steps.tracker.outputs.message }}"
if [ -z "$MSG" ]; then
MSG="chore: scheduled update"
fi
git commit -m "$MSG"
git push