@@ -66,35 +66,42 @@ Production promotion is part of the generated flow, but keep it protected:
6666| ` PRODUCTION_APP_NAME ` | Prefer ` production ` Environment variable | Production app name from ` controlplane.yml ` . |
6767
6868Configure the ` production ` GitHub Environment with required reviewers and
69- prevent self-review. The generated promotion wrapper passes only the staging
70- token from repository secrets; GitHub injects ` CPLN_TOKEN_PRODUCTION ` only after
71- the environment approval gate passes.
69+ prevent self-review. Production promotion intentionally runs as a normal
70+ caller-repo workflow job with ` environment: production ` , then checks out the
71+ pinned ` control-plane-flow ` release for shared actions. Do not move production
72+ promotion behind a cross-repo reusable workflow: GitHub does not expose this
73+ repo's environment secrets to that called workflow.
74+
75+ Keep ` CPLN_TOKEN_PRODUCTION ` absent from repository and organization secrets. A
76+ normal environment-gated job cannot tell which secret scope supplied a nonempty
77+ value, so a broader secret with the same name can mask a missing environment
78+ secret.
7279
7380If promotion fails with
7481` CPLN_TOKEN_PRODUCTION is not set. Add it as a secret on the 'production' GitHub Environment. ` ,
75- the token is missing from the environment scope. A repository or organization
76- secret with the same name is not enough for this workflow . Create or verify the
77- environment secret with :
82+ the token is missing from the environment scope or the workflow job is no longer
83+ declaring ` environment: production ` . Create or verify the environment secret
84+ and confirm there is no same-named repository or organization secret :
7885You need permission to manage repository environments and secrets to run these
7986commands.
8087
8188``` sh
8289gh secret set CPLN_TOKEN_PRODUCTION --repo shakacode/react-webpack-rails-tutorial --env production
8390gh secret list --repo shakacode/react-webpack-rails-tutorial --env production
91+ gh secret list --repo shakacode/react-webpack-rails-tutorial
92+ gh secret list --org shakacode | grep ' ^CPLN_TOKEN_PRODUCTION[[:space:]]' || true
8493```
8594
8695Before the first promotion, bootstrap the production app the same way in the
8796production org, using production-only secrets and values.
8897
8998## Version Locking
9099
91- Generated wrappers pin Control Plane Flow once with the reusable workflow
92- ` uses: ` ref, for example ` @v5.0.4 ` . For stable releases,
93- this ref should be a release tag. The upstream reusable workflow automatically
94- loads its matching shared actions from GitHub's workflow context, so downstream
95- wrappers should not pass a duplicate Control Plane Flow ref input. If your
96- generated wrappers still include a ` with: ` block whose only purpose is to repeat
97- the same ref, regenerate them with a newer ` cpflow ` .
100+ Generated wrappers pin Control Plane Flow with a release tag, for example
101+ ` v5.0.4 ` . Reusable review-app, staging, cleanup, and helper workflows pin the
102+ tag in their ` uses: ` ref. Production promotion pins the same tag in the
103+ ` Checkout control-plane-flow actions ` step so the caller-owned job can keep
104+ ` environment: production ` and receive production environment secrets directly.
98105
99106Leave ` CPFLOW_VERSION ` unset so the workflow builds cpflow from the same
100107checked-out upstream source. If you set ` CPFLOW_VERSION ` , it must match the
0 commit comments