Skip to content

Commit 9a390c1

Browse files
committed
Document cpflow workflow updates
1 parent 65bc286 commit 9a390c1

2 files changed

Lines changed: 33 additions & 0 deletions

File tree

.controlplane/readme.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -406,3 +406,27 @@ configuration.
406406
2. Make edits to files such as `.github/actions/cpflow-build-docker-image/action.yml` or `.github/workflows/cpflow-deploy-review-app.yml`
407407
3. Run a script like `ga .github && gc -m fixes && gp` to commit and push changes (ga = git add, gc = git commit, gp = git push)
408408
4. Check the GitHub Actions tab in the PR to see the status of the workflow
409+
410+
### Keeping Generated cpflow Workflows Updated
411+
412+
Treat `.github/actions/cpflow-*` and `.github/workflows/cpflow-*` as generated
413+
workflow files with project-specific settings layered on top. When `cpflow`
414+
releases generator fixes or the upstream `control-plane-flow` repo changes the
415+
GitHub Actions flow, update a project by regenerating the flow from the desired
416+
`cpflow` version or branch, reviewing the diff, and keeping any local app names,
417+
repository variables, secrets, and docs aligned with `.controlplane/controlplane.yml`.
418+
419+
For this app, validate a regenerated flow with:
420+
421+
```bash
422+
bundle exec ruby /path/to/control-plane-flow/bin/cpflow generate-github-actions
423+
bundle exec ruby /path/to/control-plane-flow/bin/cpflow github-flow-readiness
424+
actionlint .github/workflows/cpflow-*.yml
425+
bundle exec rubocop
426+
```
427+
428+
Then open a normal PR and let GitHub Actions prove the generated review-app,
429+
staging, lint, JS, and RSpec workflows before merging. If a project needs to
430+
track generator changes automatically, use a scheduled maintenance PR or
431+
Renovate-style workflow that bumps the `cpflow` version, regenerates these files,
432+
and runs the same validation commands.

.controlplane/shakacode-team.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,15 @@ Optional repository settings:
5252
If staging moves off `master`, update both `STAGING_APP_BRANCH` and the branch
5353
filter in `.github/workflows/cpflow-deploy-staging.yml`.
5454

55+
### Keeping cpflow Automation Current
56+
57+
When the upstream `control-plane-flow` repo changes the generated GitHub Actions
58+
flow, regenerate the `cpflow-*` actions/workflows in this repo from the target
59+
`cpflow` version or branch, review the diff, and keep the repository variables
60+
above aligned with `.controlplane/controlplane.yml`. Validate with
61+
`cpflow github-flow-readiness`, `actionlint .github/workflows/cpflow-*.yml`, and
62+
the normal CI checks before merging.
63+
5564
See [readme.md](readme.md) for more details.
5665

5766
## Links

0 commit comments

Comments
 (0)