chore(ci): move the last repo variables to secrets

Merged
SA
3mo ago
+13-9

docs/environment-variables.md says "Always a secret, never a repo variable, even for something as unsecret as a bucket name — one mechanism means one place to look when a value goes missing." Five variables predated that rule.

variablereferences
R2_PRIVATE_BUCKETblob-port.yml, deploy-production.yml
GH_APP_SLUGdeploy-production.yml, deploy-preview.yml
SUPERSET_API_URL / SUPERSET_WEB_URLbuild-cli.yml
NEON_PROJECT_IDdeploy-preview.yml ×2, cleanup-preview.yml

Nine references, five workflows. The repo secrets are already set to the exact values the variables held, so no deploy changes behaviour.

Two traps checked before switching, both clear:

  • build-cli.yml is on: workflow_call. Reusable workflows inherit vars automatically but not secrets. Both callers (ci.yml, release-cli.yml) already pass secrets: inherit, and it already reads secrets.RELAY_URL two lines above the two vars.
  • cleanup-preview.yml declares no environment:, so on a fork PR it would lose a secret's value — but it already depends on secrets.NEON_API_KEY, so holding its project id as a variable bought nothing.

Added the workflow_call trap to the doc, since it is the one way this could have failed silently. Drop that hunk if you would rather keep the doc to the five-place checklist.

After merge: delete the five now-unreferenced repo variables, plus the dead NEXT_PUBLIC_SENTRY_ENVIRONMENT environment variables that #7074 superseded with secrets.

https://claude.ai/code/session_01HmfE4Qm77AwKUxJeFVMetY


Summary by cubic

Moves the last five GitHub Actions repo variables (R2_PRIVATE_BUCKET, GH_APP_SLUG, SUPERSET_API_URL, SUPERSET_WEB_URL, NEON_PROJECT_ID) to secrets so all environment values live in one place. The secrets already hold the same values, so no workflow behavior changes.

Migration

  • After merge, delete the five now-unreferenced repo variables and the dead NEXT_PUBLIC_SENTRY_ENVIRONMENT environment variables.
  • docs/environment-variables.md now notes that reusable workflows inherit vars but not secrets, so callers must pass secrets: inherit.

Summary by CodeRabbit

  • Bug Fixes

    • Improved deployment workflows by sourcing required configuration securely from encrypted secrets.
    • Fixed configuration handling across preview, production, CLI build, and storage workflows.
  • Documentation

    • Added guidance for passing secrets to reusable workflows so required values are available during execution.