brackt/.forgejo/workflows/sync-and-simulate.yml
Chris Parsons 52eb3abac1
All checks were successful
🚀 Deploy / 🧪 Test (pull_request) Successful in 2m45s
🚀 Deploy / ʦ🔍 Typecheck & Lint (pull_request) Successful in 1m29s
🚀 Deploy / 🐳 Build (pull_request) Has been skipped
🚀 Deploy / 🚀 Deploy (pull_request) Has been skipped
Fix three code review findings from Phase A cron jobs
- Remove `| cat` from both Forgejo workflow curl commands so HTTP 4xx/5xx
  causes the step to fail (bash pipeline exit code was always 0 via cat)
- Simplify sync-and-simulate: drop redundant pre-check DB query for
  standingsLastChangedAt; changed===true already means standings updated
  this run, so always simulate (runner's simulationStatus guard handles overlap)
- Delete server/snapshots.ts — all exports were orphaned after startSnapshotSystem
  was removed from server/socket.ts in the Phase A commit

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-08 00:35:02 -07:00

14 lines
392 B
YAML

name: Sync standings and simulate
on:
schedule:
- cron: '0 */2 * * *'
jobs:
run:
runs-on: ubuntu-latest
steps:
- name: Sync standings and run simulations where changed
run: |
curl -sf -X POST https://brackt.com/admin/jobs/sync-and-simulate \
-H "X-Cron-Secret: ${{ secrets.CRON_SECRET }}" \
-H "Content-Type: application/json"