Deploy staging on every push, across repositories
Let a push to staging start a chain of GitHub Actions deployments, so the services that depend on the change are redeployed after it, in order, instead of drifting.
One push, several repositories
A push to staging redeploys the repository that changed. But if the web app and the mobile gateway depend on the API, staging is only really up to date once they have been deployed after it, in order. Doing that by hand is the step everyone forgets.
How auto-start works
Turn on Auto-start for a flow and it also starts when one of its first workflows runs outside Kodmos: a push that triggers api/deploy.yml, or someone pressing Run workflow on GitHub. Kodmos attaches to that GitHub run, waits for it to finish, and continues the chain from there.
- Only the part of the flow downstream of that trigger runs.
- The trigger’s branch must match the branch on the box, so a push to
stagingstarts the staging flow and not the production one. - Runs that Kodmos dispatched itself never auto-start other flows, so two flows cannot trigger each other in a loop.
The workflow keeps its push trigger, and keeps workflow_dispatch so Kodmos can also start it as part of a release. On a push there are no inputs, so give the environment a fallback.
name: Deploy
on:
push:
branches: [staging]
workflow_dispatch:
inputs:
environment:
type: choice
options: [Test, Production]
required: true
jobs:
deploy:
runs-on: ubuntu-latest
environment: ${{ inputs.environment || 'Test' }}
steps:
- uses: actions/checkout@v4
- run: ./scripts/deploy.sh "${{ inputs.environment || 'Test' }}"Start from the production flow
The staging flow is usually the production one pointed at other branches. Duplicate copies a flow without its run history and opens the copy in the editor: switch each box to the staging branch and the environment input to Test.
Watch it run
Each box shows its GitHub run as it happens: queued, waiting for approval, running, done. When a flow run fails outside a release, DevOps gets an email about it.


More use cases
How to run a weekly release train across GitHub repositories
Platform, Web and Mobile each add a branch by Wednesday; on Thursday the API ships first, then everything that talks to it.
Ship a hotfix with the rollback already armed
One branch straight to production. If the API fails, the rollback runs on its own and the web app is skipped.
Ship infrastructure before services, with environment approvals
Cluster changes wait for the environment’s reviewers; the worker that depends on them starts only once they are done.