A minimal single-environment cascade example whose purpose is to prove the
repository_dispatch rollback entry point live.
The manifest declares one environment (prod), one build, and one deploy, and
opts the generated rollback workflow into a repository_dispatch trigger:
rollback:
repository_dispatch:
types: [rollback-requested]With that opt-in, cascade-rollback.yaml carries both the manual
(workflow_dispatch) and the external (repository_dispatch) entry points, and
each rollback parameter is read as
github.event.inputs.<key> || github.event.client_payload.<key> so an external
system can drive the same rollback by calling the dispatches API.
scenario-suite.yaml seeds two successive prod deploys, then fires a real
repository_dispatch rollback:
gh api "repos/$REPO/dispatches" -X POST \
-f event_type=rollback-requested \
-f 'client_payload[environment]=prod' \
-F 'client_payload[dry_run]=false'It then asserts the real effect: prod reverts to the prior deploy's SHA and
version and is marked diverged (ref=rollback/prod). This is the only live
coverage of the client_payload coalesce path.
.github/manifest.yaml- the cascade manifest (one env, rollback dispatch on)..github/workflows/orchestrate.yaml,promote.yaml,cascade-rollback.yaml- generated bycascade generate-workflow; do not edit by hand..github/workflows/build-app.yaml,deploy-app.yaml- the build and deploy callbacks the pipeline drives..github/workflows/scenario-suite.yaml- the live validation driver.src/- the source of record a merge changes to drive orchestrate.
Regenerate the workflows after a manifest change:
cascade generate-workflow --config .github/manifest.yaml --force