ci(ci): add SRS_ADMIN_KEY env var to spaced-repetition workflow

This commit is contained in:
Prad Nukala
2026-08-31 10:48:36 -04:00
parent 5ea123e46d
commit 1622bf39b7
+11 -4
View File
@@ -1,10 +1,11 @@
name: Spaced Repetition
# Opens (or refreshes) today's `Spaced Repetition — <Month D, YYYY>` issue from
# the problem issues closed 3 and 7 days ago. No stored state: the script
# recomputes both windows from the tracker's close dates on every run, keyed by
# the ET date in the title, so a re-run rewrites one body instead of stacking
# duplicates and a missed day simply never appears.
# whatever the SRS ladder has due (`POST /admin/due`, the same rows the 8 AM
# digest mails — so the two cannot disagree). The script stores nothing and
# schedules nothing: it asks D1 what is standing today, keyed by the ET date in
# the title, so a re-run rewrites one body instead of stacking duplicates.
# Sunday is the rest day and the ladder never books it, so nothing is written.
on:
schedule:
@@ -40,8 +41,14 @@ jobs:
- uses: oven-sh/setup-bun@v2
# No install step: the script only uses Bun builtins + fetch.
#
# SRS_ADMIN_KEY reads today's due list from the Worker. Unset is fatal
# here, unlike in close-solved: without D1 there is no schedule to render,
# and inventing one from issue close dates is exactly the second source of
# truth this replaced.
- run: bun apps/cli/spaced-repetition.ts
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
DRY_RUN: ${{ inputs.dry_run }}
SRS_TODAY: ${{ inputs.date }}
SRS_ADMIN_KEY: ${{ secrets.SRS_ADMIN_KEY }}