cpflow 5.0.0 → 5.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (30) hide show
  1. checksums.yaml +4 -4
  2. data/.claude/commands/update-changelog.md +88 -23
  3. data/.github/actions/cpflow-resolve-review-config/action.yml +137 -0
  4. data/.github/actions/cpflow-setup-environment/action.yml +118 -0
  5. data/.github/workflows/cpflow-cleanup-stale-review-apps.yml +26 -21
  6. data/.github/workflows/cpflow-delete-review-app.yml +21 -18
  7. data/.github/workflows/cpflow-deploy-review-app.yml +23 -19
  8. data/.github/workflows/cpflow-deploy-staging.yml +15 -11
  9. data/.github/workflows/cpflow-help-command.yml +0 -6
  10. data/.github/workflows/cpflow-promote-staging-to-production.yml +30 -5
  11. data/.github/workflows/cpflow-review-app-help.yml +1 -10
  12. data/CHANGELOG.md +23 -1
  13. data/Gemfile.lock +1 -1
  14. data/docs/ai-github-flow-prompt.md +1 -1
  15. data/docs/ci-automation.md +165 -29
  16. data/lib/command/ai_github_flow_prompt.rb +1 -1
  17. data/lib/cpflow/version.rb +1 -1
  18. data/lib/generator_templates/Dockerfile +1 -0
  19. data/lib/generator_templates/entrypoint.sh +42 -2
  20. data/lib/github_flow_templates/.github/cpflow-help.md +79 -83
  21. data/lib/github_flow_templates/.github/workflows/cpflow-cleanup-stale-review-apps.yml +4 -9
  22. data/lib/github_flow_templates/.github/workflows/cpflow-delete-review-app.yml +2 -9
  23. data/lib/github_flow_templates/.github/workflows/cpflow-deploy-review-app.yml +3 -9
  24. data/lib/github_flow_templates/.github/workflows/cpflow-deploy-staging.yml +3 -8
  25. data/lib/github_flow_templates/.github/workflows/cpflow-help-command.yml +0 -9
  26. data/lib/github_flow_templates/.github/workflows/cpflow-promote-staging-to-production.yml +10 -8
  27. data/lib/github_flow_templates/.github/workflows/cpflow-review-app-help.yml +4 -10
  28. data/lib/github_flow_templates/bin/pin-cpflow-github-ref +3 -1
  29. data/lib/github_flow_templates/bin/test-cpflow-github-flow +23 -8
  30. metadata +2 -1
@@ -4,12 +4,13 @@ run-name: "Deploy Review App - PR #${{ github.event.pull_request.number || githu
4
4
 
5
5
  on:
6
6
  workflow_call:
7
- inputs:
8
- control_plane_flow_ref:
9
- description: Git ref used to load shared cpflow composite actions.
7
+ secrets:
8
+ CPLN_TOKEN_STAGING:
9
+ description: Control Plane token for the staging org that owns review apps.
10
+ required: true
11
+ DOCKER_BUILD_SSH_KEY:
12
+ description: Optional SSH key used by Docker builds that fetch private dependencies.
10
13
  required: false
11
- type: string
12
- default: main
13
14
 
14
15
  permissions:
15
16
  contents: read
@@ -25,8 +26,6 @@ concurrency:
25
26
  cancel-in-progress: false
26
27
 
27
28
  env:
28
- APP_NAME: ${{ vars.REVIEW_APP_PREFIX }}-${{ github.event.pull_request.number || github.event.issue.number || github.event.inputs.pr_number }}
29
- CPLN_ORG: ${{ vars.CPLN_ORG_STAGING }}
30
29
  PR_NUMBER: ${{ github.event.pull_request.number || github.event.issue.number || github.event.inputs.pr_number }}
31
30
  PRIMARY_WORKLOAD: ${{ vars.PRIMARY_WORKLOAD }}
32
31
 
@@ -72,8 +71,8 @@ jobs:
72
71
  - name: Checkout control-plane-flow actions
73
72
  uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
74
73
  with:
75
- repository: shakacode/control-plane-flow
76
- ref: ${{ inputs.control_plane_flow_ref }}
74
+ repository: ${{ job.workflow_repository }}
75
+ ref: ${{ job.workflow_sha }}
77
76
  path: .cpflow
78
77
  persist-credentials: false
79
78
 
@@ -82,13 +81,9 @@ jobs:
82
81
  uses: ./.cpflow/.github/actions/cpflow-validate-config
83
82
  env:
84
83
  CPLN_TOKEN_STAGING: ${{ secrets.CPLN_TOKEN_STAGING }}
85
- CPLN_ORG_STAGING: ${{ vars.CPLN_ORG_STAGING }}
86
- REVIEW_APP_PREFIX: ${{ vars.REVIEW_APP_PREFIX }}
87
84
  with:
88
85
  required: |
89
86
  secret:CPLN_TOKEN_STAGING
90
- variable:CPLN_ORG_STAGING
91
- variable:REVIEW_APP_PREFIX
92
87
  pull_request_friendly: "true"
93
88
 
94
89
  - name: Resolve PR ref and commit
@@ -106,7 +101,6 @@ jobs:
106
101
  DISPATCH_PR_NUMBER: ${{ github.event.inputs.pr_number }}
107
102
  ISSUE_NUMBER: ${{ github.event.issue.number }}
108
103
  PR_EVENT_NUMBER: ${{ github.event.pull_request.number }}
109
- REVIEW_APP_PREFIX: ${{ vars.REVIEW_APP_PREFIX }}
110
104
  shell: bash
111
105
  run: |
112
106
  set -euo pipefail
@@ -137,7 +131,6 @@ jobs:
137
131
  fi
138
132
 
139
133
  echo "PR_NUMBER=$pr_number" >> "$GITHUB_ENV"
140
- echo "APP_NAME=${REVIEW_APP_PREFIX}-$pr_number" >> "$GITHUB_ENV"
141
134
  echo "PR_SHA=$pr_sha" >> "$GITHUB_ENV"
142
135
  echo "same_repo=${same_repo}" >> "$GITHUB_OUTPUT"
143
136
 
@@ -194,14 +187,25 @@ jobs:
194
187
  set -euo pipefail
195
188
  rm -rf app/.git
196
189
 
190
+ - name: Resolve review app config
191
+ if: steps.config.outputs.ready == 'true' && steps.source.outputs.allowed == 'true'
192
+ id: review-config
193
+ uses: ./.cpflow/.github/actions/cpflow-resolve-review-config
194
+ with:
195
+ working_directory: app
196
+ configured_cpln_org_staging: ${{ vars.CPLN_ORG_STAGING }}
197
+ configured_review_app_prefix: ${{ vars.REVIEW_APP_PREFIX }}
198
+ pr_number: ${{ env.PR_NUMBER }}
199
+
197
200
  - name: Setup environment
198
201
  if: steps.config.outputs.ready == 'true' && steps.source.outputs.allowed == 'true'
199
202
  uses: ./.cpflow/.github/actions/cpflow-setup-environment
200
203
  with:
201
204
  token: ${{ secrets.CPLN_TOKEN_STAGING }}
202
- org: ${{ vars.CPLN_ORG_STAGING }}
205
+ org: ${{ steps.review-config.outputs.cpln_org }}
203
206
  cpln_cli_version: ${{ vars.CPLN_CLI_VERSION }}
204
207
  cpflow_version: ${{ vars.CPFLOW_VERSION }}
208
+ control_plane_flow_ref: ${{ job.workflow_ref }}
205
209
  working_directory: app
206
210
 
207
211
  - name: Detect release phase support
@@ -209,7 +213,7 @@ jobs:
209
213
  id: release-phase
210
214
  uses: ./.cpflow/.github/actions/cpflow-detect-release-phase
211
215
  with:
212
- app_name: ${{ env.APP_NAME }}
216
+ app_name: ${{ steps.review-config.outputs.app_name }}
213
217
  working_directory: app
214
218
 
215
219
  - name: Check if review app exists
@@ -355,8 +359,8 @@ jobs:
355
359
  if: steps.config.outputs.ready == 'true' && steps.source.outputs.allowed == 'true' && (steps.check-app.outputs.exists == 'true' || steps.setup-review-app.outcome == 'success')
356
360
  uses: ./.cpflow/.github/actions/cpflow-build-docker-image
357
361
  with:
358
- app_name: ${{ env.APP_NAME }}
359
- org: ${{ vars.CPLN_ORG_STAGING }}
362
+ app_name: ${{ steps.review-config.outputs.app_name }}
363
+ org: ${{ steps.review-config.outputs.cpln_org }}
360
364
  commit: ${{ env.PR_SHA }}
361
365
  pr_number: ${{ env.PR_NUMBER }}
362
366
  docker_build_extra_args: ${{ vars.DOCKER_BUILD_EXTRA_ARGS }}
@@ -5,16 +5,18 @@ run-name: Deploy Control Plane staging app
5
5
  on:
6
6
  workflow_call:
7
7
  inputs:
8
- control_plane_flow_ref:
9
- description: Git ref used to load shared cpflow composite actions.
10
- required: false
11
- type: string
12
- default: main
13
8
  staging_app_branch_default:
14
9
  description: Fallback branch name baked into the generated caller workflow.
15
10
  required: false
16
11
  type: string
17
12
  default: ""
13
+ secrets:
14
+ CPLN_TOKEN_STAGING:
15
+ description: Control Plane token for the staging org.
16
+ required: true
17
+ DOCKER_BUILD_SSH_KEY:
18
+ description: Optional SSH key used by Docker builds that fetch private dependencies.
19
+ required: false
18
20
 
19
21
  permissions:
20
22
  contents: read
@@ -62,8 +64,8 @@ jobs:
62
64
  if: steps.check-branch.outputs.is_deployable == 'true'
63
65
  uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
64
66
  with:
65
- repository: shakacode/control-plane-flow
66
- ref: ${{ inputs.control_plane_flow_ref }}
67
+ repository: ${{ job.workflow_repository }}
68
+ ref: ${{ job.workflow_sha }}
67
69
  path: .cpflow
68
70
  persist-credentials: false
69
71
 
@@ -94,8 +96,8 @@ jobs:
94
96
  - name: Checkout control-plane-flow actions
95
97
  uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
96
98
  with:
97
- repository: shakacode/control-plane-flow
98
- ref: ${{ inputs.control_plane_flow_ref }}
99
+ repository: ${{ job.workflow_repository }}
100
+ ref: ${{ job.workflow_sha }}
99
101
  path: .cpflow
100
102
  persist-credentials: false
101
103
 
@@ -107,6 +109,7 @@ jobs:
107
109
  working_directory: .cpflow
108
110
  cpln_cli_version: ${{ vars.CPLN_CLI_VERSION }}
109
111
  cpflow_version: ${{ vars.CPFLOW_VERSION }}
112
+ control_plane_flow_ref: ${{ job.workflow_ref }}
110
113
 
111
114
  - name: Build Docker image
112
115
  uses: ./.cpflow/.github/actions/cpflow-build-docker-image
@@ -132,8 +135,8 @@ jobs:
132
135
  - name: Checkout control-plane-flow actions
133
136
  uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
134
137
  with:
135
- repository: shakacode/control-plane-flow
136
- ref: ${{ inputs.control_plane_flow_ref }}
138
+ repository: ${{ job.workflow_repository }}
139
+ ref: ${{ job.workflow_sha }}
137
140
  path: .cpflow
138
141
  persist-credentials: false
139
142
 
@@ -145,6 +148,7 @@ jobs:
145
148
  working_directory: .cpflow
146
149
  cpln_cli_version: ${{ vars.CPLN_CLI_VERSION }}
147
150
  cpflow_version: ${{ vars.CPFLOW_VERSION }}
151
+ control_plane_flow_ref: ${{ job.workflow_ref }}
148
152
 
149
153
  - name: Detect release phase support
150
154
  id: release-phase
@@ -2,12 +2,6 @@ name: Review App Help Command
2
2
 
3
3
  on:
4
4
  workflow_call:
5
- inputs:
6
- control_plane_flow_ref:
7
- description: Accepted for generated wrapper consistency; unused because this workflow checks out caller content only.
8
- required: false
9
- type: string
10
- default: main
11
5
 
12
6
  permissions:
13
7
  contents: read
@@ -3,11 +3,18 @@ name: Promote Staging to Production
3
3
  on:
4
4
  workflow_call:
5
5
  inputs:
6
- control_plane_flow_ref:
7
- description: Git ref used to load shared cpflow composite actions.
6
+ production_environment:
7
+ description: GitHub Environment that protects production promotion and stores production-only secrets.
8
8
  required: false
9
9
  type: string
10
- default: main
10
+ default: production
11
+ secrets:
12
+ CPLN_TOKEN_STAGING:
13
+ description: Control Plane token for reading the already-deployed staging image.
14
+ required: true
15
+ CPLN_TOKEN_PRODUCTION:
16
+ description: Production Control Plane token. Store it on the protected production Environment; do not pass it from a repository secret.
17
+ required: false
11
18
 
12
19
  permissions:
13
20
  contents: read
@@ -48,6 +55,10 @@ jobs:
48
55
  promote-to-production:
49
56
  if: github.event.inputs.confirm_promotion == 'promote'
50
57
  runs-on: ubuntu-latest
58
+ # GitHub uses secrets from this protected Environment for jobs that declare
59
+ # it, so CPLN_TOKEN_PRODUCTION should be configured only there. The caller
60
+ # wrapper intentionally passes only CPLN_TOKEN_STAGING.
61
+ environment: ${{ inputs.production_environment }}
51
62
  timeout-minutes: 45
52
63
 
53
64
  steps:
@@ -59,11 +70,24 @@ jobs:
59
70
  - name: Checkout control-plane-flow actions
60
71
  uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
61
72
  with:
62
- repository: shakacode/control-plane-flow
63
- ref: ${{ inputs.control_plane_flow_ref }}
73
+ repository: ${{ job.workflow_repository }}
74
+ ref: ${{ job.workflow_sha }}
64
75
  path: .cpflow
65
76
  persist-credentials: false
66
77
 
78
+ - name: Validate production token
79
+ shell: bash
80
+ env:
81
+ CPLN_TOKEN_PRODUCTION: ${{ secrets.CPLN_TOKEN_PRODUCTION }}
82
+ PRODUCTION_ENVIRONMENT: ${{ inputs.production_environment }}
83
+ run: |
84
+ set -euo pipefail
85
+
86
+ if [[ -z "${CPLN_TOKEN_PRODUCTION}" ]]; then
87
+ echo "::error::CPLN_TOKEN_PRODUCTION is not set. Add it as a secret on the '${PRODUCTION_ENVIRONMENT}' GitHub Environment."
88
+ exit 1
89
+ fi
90
+
67
91
  - name: Validate required secrets and variables
68
92
  uses: ./.cpflow/.github/actions/cpflow-validate-config
69
93
  # Pass secrets via env so the composite action checks indirect shell
@@ -92,6 +116,7 @@ jobs:
92
116
  working_directory: .cpflow
93
117
  cpln_cli_version: ${{ vars.CPLN_CLI_VERSION }}
94
118
  cpflow_version: ${{ vars.CPFLOW_VERSION }}
119
+ control_plane_flow_ref: ${{ job.workflow_ref }}
95
120
 
96
121
  # Runs after Setup production environment so the pinned Ruby (>= 3.1) is on PATH.
97
122
  # YAML.load_file(..., aliases: true) is not supported on Ruby 3.0 (system Ruby on ubuntu-22.04).
@@ -2,12 +2,6 @@ name: Show Review App Commands on PR Open
2
2
 
3
3
  on:
4
4
  workflow_call:
5
- inputs:
6
- control_plane_flow_ref:
7
- description: Accepted for generated wrapper consistency; unused because this workflow does not check out shared actions.
8
- required: false
9
- type: string
10
- default: main
11
5
 
12
6
  permissions:
13
7
  issues: write
@@ -15,10 +9,6 @@ permissions:
15
9
 
16
10
  jobs:
17
11
  show-help:
18
- # Skip on PRs in repos that have not configured the cpflow review app flow yet,
19
- # so this workflow does not noisily comment on every contributor PR. Once the
20
- # repository sets `vars.REVIEW_APP_PREFIX`, the help message starts appearing.
21
- if: vars.REVIEW_APP_PREFIX != ''
22
12
  runs-on: ubuntu-latest
23
13
  timeout-minutes: 5
24
14
  steps:
@@ -30,6 +20,7 @@ jobs:
30
20
  "# 🚀 Quick Review App Commands",
31
21
  "",
32
22
  "Welcome! Here are the commands you can use in this PR:",
23
+ "They require the repository to have cpflow review apps configured, including the `CPLN_TOKEN_STAGING` secret.",
33
24
  "",
34
25
  "### `+review-app-deploy`",
35
26
  "Deploy your PR branch for testing.",
data/CHANGELOG.md CHANGED
@@ -12,6 +12,27 @@ In addition to the standard keepachangelog.com categories, this project uses a l
12
12
 
13
13
  ## [Unreleased]
14
14
 
15
+ ## [5.0.1] - 2026-05-24
16
+
17
+ ### Breaking Changes
18
+
19
+ - BREAKING CHANGE: Generated GitHub Actions wrappers now pin Control Plane Flow only through the `uses: shakacode/control-plane-flow/...@<ref>` line and no longer accept downstream `control_plane_flow_ref` inputs. Repositories with older generated wrappers must regenerate or remove `control_plane_flow_ref` from `with:` blocks to avoid validation failures. [PR 321](https://github.com/shakacode/control-plane-flow/pull/321) by [Justin Gordon](https://github.com/justin808).
20
+
21
+ ### Changed
22
+
23
+ - **Simplified generated review-app help docs to a compact command/setup reference and moved extended guidance to upstream CI automation docs.** [PR 319](https://github.com/shakacode/control-plane-flow/pull/319) by [Justin Gordon](https://github.com/justin808).
24
+ - **Clarified generated PR-open help opt-out guidance for forks and clones, including a sample job `if:` guard in generated wrappers.** [PR 323](https://github.com/shakacode/control-plane-flow/pull/323) by [Justin Gordon](https://github.com/justin808).
25
+ - **Improved generated GitHub Actions ref/gem alignment checks so `CPFLOW_VERSION` must match the ref pinned via `uses: shakacode/control-plane-flow/...@<ref>`, and setup validates the checked-out action code against the remote tag/commit for that ref.** [PR 318](https://github.com/shakacode/control-plane-flow/pull/318) by [Justin Gordon](https://github.com/justin808).
26
+ - **Improved review-app workflow config inference so generated deploy/delete/cleanup workflows can derive the review-app prefix and staging Control Plane org from `.controlplane/controlplane.yml`; testing review apps normally requires only the `CPLN_TOKEN_STAGING` secret.** [PR 318](https://github.com/shakacode/control-plane-flow/pull/318) by [Justin Gordon](https://github.com/justin808).
27
+ - **Improved production promotion safety docs and generated workflow validation for using a protected `production` GitHub Environment with required reviewers and a production-only `CPLN_TOKEN_PRODUCTION` environment secret.** [PR 318](https://github.com/shakacode/control-plane-flow/pull/318) by [Justin Gordon](https://github.com/justin808).
28
+
29
+ ### Fixed
30
+
31
+ - **Fixed generated Control Plane entrypoints so database preparation runs through `./bin/rails`, fails fast, and runs only for generated Rails server commands instead of every workload sharing the image.** [PR 318](https://github.com/shakacode/control-plane-flow/pull/318) by [Justin Gordon](https://github.com/justin808). Generated Dockerfiles run from `WORKDIR /app`; apps with custom Dockerfiles that run the entrypoint from another directory should adjust the `./bin/rails db:prepare` path after regenerating. Apps with hand-edited `.controlplane/entrypoint.sh` files should audit custom commands when regenerating, especially Thruster invocations with custom flags and startup paths that relied on continuing after a failed database connection.
32
+ - **Fixed generated Dockerfiles so copied Control Plane entrypoints are marked executable inside the image even if the source file mode is lost.** [PR 318](https://github.com/shakacode/control-plane-flow/pull/318) by [Justin Gordon](https://github.com/justin808).
33
+ - **Fixed generated review-app deploy/delete/cleanup workflows so they use one shared `cpflow-resolve-review-config` composite action instead of duplicated YAML parsing logic.** [PR 318](https://github.com/shakacode/control-plane-flow/pull/318) by [Justin Gordon](https://github.com/justin808).
34
+ - **Fixed generated production-promotion caller wrappers so they pass only `CPLN_TOKEN_STAGING`; `CPLN_TOKEN_PRODUCTION` remains on the protected GitHub Environment where GitHub exposes it after approval.** [PR 318](https://github.com/shakacode/control-plane-flow/pull/318) by [Justin Gordon](https://github.com/justin808).
35
+
15
36
  ## [5.0.0] - 2026-05-23
16
37
 
17
38
  ### Breaking Changes
@@ -353,7 +374,8 @@ Deprecated `cpl` gem. New gem is `cpflow`.
353
374
 
354
375
  First release.
355
376
 
356
- [Unreleased]: https://github.com/shakacode/control-plane-flow/compare/v5.0.0...HEAD
377
+ [Unreleased]: https://github.com/shakacode/control-plane-flow/compare/v5.0.1...HEAD
378
+ [5.0.1]: https://github.com/shakacode/control-plane-flow/compare/v5.0.0...v5.0.1
357
379
  [5.0.0]: https://github.com/shakacode/control-plane-flow/compare/v5.0.0.rc.3...v5.0.0
358
380
  [5.0.0.rc.3]: https://github.com/shakacode/control-plane-flow/compare/v5.0.0.rc.1...v5.0.0.rc.3
359
381
  [5.0.0.rc.1]: https://github.com/shakacode/control-plane-flow/compare/v4.2.0...v5.0.0.rc.1
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- cpflow (5.0.0)
4
+ cpflow (5.0.1)
5
5
  dotenv (~> 3.1)
6
6
  jwt (~> 3.1)
7
7
  psych (~> 5.2)
@@ -20,7 +20,7 @@ prompt tells the agent to stop on.
20
20
  ```text
21
21
  Set up Control Plane GitHub Flow for this repo. Start with `cpflow github-flow-readiness` and stop on any reported blockers. The repo must be deployable from a clean clone: published package versions, complete runtime scaffold, and a production Dockerfile that can build the app. If any package version is unpublished, inaccessible from CI, or requires credentials that are not already modeled in the repo or GitHub settings, stop and report the blocker instead of generating workflow files. If the repo is a legacy sample pinned to an obsolete Ruby or Bundler toolchain, if it does not even have a production Dockerfile yet, or if it is a monorepo without an already-decided single app boundary for this flow, stop and report that as a prerequisite instead of forcing the rollout.
22
22
 
23
- If `.controlplane/` is missing, run `cpflow generate`. Treat the generated app names as the repo-name default and rename them only if the project needs a different prefix. Then run `cpflow generate-github-actions` (or `cpflow generate-github-actions --staging-branch BRANCH` when staging should deploy from a branch other than `main`/`master`), keep review apps opt-in via `+review-app-deploy`, make sure any `STAGING_APP_BRANCH` repository variable is also present in the generated staging workflow's `on.push.branches` filter, and list the GitHub secrets and variables that must be configured.
23
+ If `.controlplane/` is missing, run `cpflow generate`. Treat the generated app names as the repo-name default and rename them only if the project needs a different prefix. Then run `cpflow generate-github-actions` (or `cpflow generate-github-actions --staging-branch BRANCH` when staging should deploy from a branch other than `main`/`master`), keep review apps opt-in via `+review-app-deploy`, make sure any `STAGING_APP_BRANCH` repository variable is also present in the generated staging workflow's `on.push.branches` filter, and list the GitHub secrets and variables that must be configured. Do not hand-edit duplicated upstream refs into the generated wrappers: the only downstream Control Plane Flow pin should be the reusable workflow `uses: ...@vX.Y.Z` value generated from the installed `cpflow` gem version, and upstream workflows load their matching shared actions automatically. Keep the standard path simple: review apps require only `CPLN_TOKEN_STAGING` when the generated review app config can be inferred. For production promotion, document a protected `production` GitHub Environment with required reviewers, prevent self-review, and `CPLN_TOKEN_PRODUCTION` stored as an environment secret, not as a repository or organization secret.
24
24
 
25
25
  Keep Node available in the final image if asset compilation or SSR depends on ExecJS, Yarn, `pnpm`, or npm after the main install layer. Make sure the generated Dockerfile uses a Ruby base image compatible with the app's declared Ruby requirement. Preserve repo-defined frontend build hooks: if `config/shakapacker.yml` defines a `precompile_hook`, or React on Rails enables `config.auto_load_bundle = true`, confirm the generated Dockerfile runs that codegen step before `rails assets:precompile`. If `config/database.yml` shows SQLite in production, confirm that the generated scaffold uses persistent `db` and `storage` volumes plus a release script that runs `rails db:prepare`; otherwise keep the default Postgres workload. If the public workload is not named `rails`, set `PRIMARY_WORKLOAD` or adjust the generated workflows. Inspect the Dockerfile and package sources for private GitHub dependencies or `RUN --mount=type=ssh`; if present, wire `DOCKER_BUILD_SSH_KEY`, optionally set `DOCKER_BUILD_SSH_KNOWN_HOSTS` for non-GitHub SSH hosts, and keep `DOCKER_BUILD_EXTRA_ARGS` to newline-delimited single tokens such as `--build-arg=FOO=bar`.
26
26