ci: manage worker secrets via wrangler-action in deploy#15
Merged
Conversation
Push GITHUB_CLIENT_ID/SECRET, GOOGLE_CLIENT_ID/SECRET and JWT_SECRET to the Worker on each deploy, sourced from repo Actions secrets. GITHUB_* worker secrets map from GH_OAUTH_* actions secrets (GITHUB_ prefix is reserved). SENTRY_DSN stays manually managed on Cloudflare. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Push the Worker's auth secrets to Cloudflare on every deploy via
wrangler-action'ssecrets:input, sourced from repo Actions secrets — instead of relying on manually-set, out-of-band Worker secrets.Secrets now managed by CD:
GITHUB_CLIENT_ID/GITHUB_CLIENT_SECRET← Actions secretsGH_OAUTH_CLIENT_ID/GH_OAUTH_CLIENT_SECRET(theGITHUB_prefix is reserved for Actions secret names, so they're aliased)GOOGLE_CLIENT_ID/GOOGLE_CLIENT_SECRETJWT_SECRETSENTRY_DSNis intentionally left out — it stays manually managed on Cloudflare.Why
Makes the Worker's secret config reproducible and version-tracked (which secrets exist, where their values come from) rather than living only on the Cloudflare side. Rotation becomes "update the Actions secret + redeploy".
On deploy, CD overwrites the matching Cloudflare Worker secrets with the Actions-secret values. The Actions secrets have already been populated, so values stay consistent — except
JWT_SECRET, which is a freshly generated key: deploying will invalidate all existing openboot.dev login sessions (users must re-login). The newJWT_SECRETis stored in 1Password (Dev vault) as the recoverable source of truth.🤖 Generated with Claude Code