Weekly Monitor #11
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: Weekly Monitor | |
| on: | |
| schedule: | |
| - cron: '0 9 * * 1' | |
| workflow_dispatch: | |
| permissions: | |
| contents: write | |
| issues: read | |
| jobs: | |
| monitor: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: actions/setup-node@v6 | |
| with: | |
| node-version: '24' | |
| - name: Run monitor | |
| env: | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: | | |
| node scripts/monitor-github.js --output data/monitor-results.json | |
| - name: Commit results | |
| run: | | |
| git config user.name "github-actions[bot]" | |
| git config user.email "github-actions[bot]@users.noreply.github.com" | |
| git add data/monitor-results.json | |
| if git diff --staged --quiet; then | |
| echo "No changes to commit." | |
| exit 0 | |
| fi | |
| git commit -m "chore: update monitor results $(date -u +%Y-%m-%d)" | |
| for i in 1 2 3 4 5; do | |
| git pull --rebase origin main && git push && exit 0 | |
| echo "push attempt $i failed, retrying in 5s..." | |
| sleep 5 | |
| done | |
| echo "push failed after 5 attempts" >&2 | |
| exit 1 |