chore: remove explicit secrets list from build workflow using toJSON(secrets)#26274
Conversation
|
CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes. |
🔍 Smart E2E Test Selection
click to see 🤖 AI reasoning detailsE2E Test Selection:
These changes:
The build workflow execution itself will validate whether secrets are properly passed. If the secrets injection fails, the build would fail before any E2E tests could run anyway. No E2E tests are needed to validate these CI infrastructure changes. Performance Test Selection: |
|



Description
The Set secrets step in .github/workflows/build.yml required every GitHub secret to be explicitly listed in the workflow YAML (e.g. SEGMENT_WRITE_KEY: ${{ secrets.SEGMENT_WRITE_KEY }}). This meant that adding or renaming a secret in builds.yml also required running yarn build:workflow:update-secrets to regenerate that list — a manual, easy-to-forget maintenance step.
This PR eliminates that requirement by passing the entire secrets context as a single JSON blob via toJSON(secrets), which set-secrets-from-config.js then parses at runtime. The script already had all the logic to select and remap only the relevant secrets for the active build via CONFIG_SECRETS — it just needed the values delivered differently.
Changes:
Update set-secrets-from-config.js to look up secret values from the parsed ALL_SECRETS object instead of individual env vars
Remove the build:workflow:update-secrets yarn script from package.json
To test: chore/testing-branch
Changelog
CHANGELOG entry:
Related issues
Fixes:
Manual testing steps
Screenshots/Recordings
Before
After
Pre-merge author checklist
Pre-merge reviewer checklist
Note
Medium Risk
Changes CI secret plumbing for all builds; a mismatch in JSON structure/availability (or missing secrets in the environment) could cause builds to fail or run with unset config.
Overview
Build workflow secret injection is simplified by replacing the long, explicitly enumerated secrets
env:block in.github/workflows/build.ymlwith a singleALL_SECRETS: ${{ toJSON(secrets) }}payload.scripts/set-secrets-from-config.jsnow reads secret values fromALL_SECRETSwhen applying theCONFIG_SECRETSmapping intoGITHUB_ENV, and the no-longer-needed maintenance scriptscripts/generate-build-workflow-secrets-env.jsplus thebuild:workflow:update-secretsyarn script are removed.Written by Cursor Bugbot for commit 14e11c5. This will update automatically on new commits. Configure here.