ci: authenticate Turbo remote cache via GitHub OIDC - #1656
Conversation
Port of #1644 to default branch `dev`. Co-authored-by: Cursor <cursoragent@cursor.com>
|
There was a problem hiding this comment.
ℹ️ Minor suggestions only — the OIDC swap is correct and complete; two small cleanups were left behind.
Reviewed changes
- New shared composite action —
.github/actions/setup-turbo-remote-cache/action.ymlexchanges GitHub OIDC for a short-lived Vercel turbo cache token viavercel/setup-turborepo-remote-cache-action@v1.1.0, guarded to skip forkpull_requestruns where GitHub withholds OIDC (ports #1644 verbatim). - Value swap across all turbo-running workflows — removed the
TURBO_TOKEN/TURBO_TEAMenv fromtest.yml,deploy-www.yml,deploy-www-manual.yml,pkg-pr-new.yml,release.yml,size-limit.yml, andpreview-www-reusable.yml, and added the setup step after checkout in every turbo-running job (all 7test.ymljobs included, down to the matrix/schedulevariants). permissions:hardening —id-token: writeadded at workflow/job level everywhere the action runs;test.ymlexplicitly retainsactions: write(needed foractions/cachesaves and artifact uploads) and the preview callers keeppull-requests: write.
Fork coverage, OIDC-mint rules (schedule/workflow_dispatch/pull_request_target all mint; the action's if guard handles the one legit skip case), and the secrets.TURBO_TOKEN end-state are all consistent with the #1644 reference and the repo's existing patterns.
ℹ️ Nitpicks
- After dropping
turbo_token/turbo_teamfrom thesize-limit.ymlwith:block,.github/actions/size-limit/action.ymlstill declares both inputs andsrc/config.ts/src/size-limit/run.tsstill read them. They're inert —config.tsno-ops on empty input andrun.tsfalls back to theTURBO_TOKEN/TURBO_TEAMthe setup action exports — but they're the lastTURBO_TOKEN-shaped config standing once the secret is deleted. Consider removing both inputs (and theINPUT_TURBO_*env mappings) as a follow-up. preview-www-default.ymlandpreview-www-labeled.ymladdid-token: writeat the caller job, but the reusable workflow'sDeploy-Previewjob already declares its own job-level permissions including the newid-token: write. For same-repo reusable workflows GitHub only requires the caller-level grant when the reusable workflow is external to the org, so these are redundant — harmless (neither caller requests a token itself), just not needed.
DeepSeek Flash (free via Pullfrog for OSS) | 𝕏
|
Triaging the Pullfrog nits as non-blocking for this port of #1644:
No code change for either. |
Keep Turbo OIDC setup; take checkout@v7 from dev. Co-authored-by: Cursor <cursoragent@cursor.com>

Summary
dev. Pattern-matched, not cherry-picked — package layout and workflows differ betweenv1anddev..github/actions/setup-turbo-remote-cacheexchanges GitHub OIDC for a short-lived Vercel Remote Cache token after checkout on every job that runs Turbo.v1merge; this extends the same fix todev(and thusmaindeploys). Do not delete theTURBO_TOKENGitHub secret until this PR merges. After bothv1anddevuse OIDC, the secret can go.Assumes the Vercel Turborepo CLI OIDC policy for
yamcodes/arkenvandTURBO_TEAMare already set (same as #1644).Test plan
testworkflow: setup step succeedsRemote caching enabledInsufficient permissions to write to remote cacheontest/test-build/test-e2eMade with Cursor