ci: continuously deploy green main commits to staging (app only) - #1412
Conversation
Adds cd-staging.yml: after CI/CD succeeds on main, deploy that exact commit's immutable :<sha> image to Staging, app only. Production stays release-gated with manual approval, so Staging tracks main HEAD and Production tracks released versions. Core (NATS/webhook) and proxy are never auto-deployed — recreating NATS forces a JetStream recovery — so a preflight skips cleanly when no image was published (build dedup) and a flag-infra-changes job warns when compose.core/compose.proxy change so an operator can run the manual deploy-core/deploy-proxy path. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012stCYrymLyX9VZ8PrPUs88
|
Warning Review limit reached
Next review available in: 28 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
📚 Documentation Preview
|
What
Continuously deploy every green commit on main to Staging (app only). New workflow
cd-staging.yml; nothing else changes.Today staging deploys only when a release is cut (
release.yml,if: released == 'true'), so main HEAD and staging drift between releases. This closes that gap while keeping production release-gated.Result: Staging = main HEAD, Production = released versions.
How it works
workflow_run: [CI/CD] completedonmain, gatedif: conclusion == 'success'— deploy only on green (mirrors the existingrelease.ymltrigger).:<sha>image that CI already publishes — traceable, reproducible, rollback-friendly. Same "build once, deploy many" image that a release later promotes to prod.deploy-core: false, deploy-proxy: false. NATS/webhook and proxy are stateful/disruptive to recreate (a NATS restart forces a JetStream recovery), so they're never auto-deployed.preflight: skips cleanly (no red run) whenskip-duplicate-actionsdeduped the build and no:<sha>image exists.flag-infra-changes: whendocker/compose.core.yamlorcompose.proxy.yamlchanged, emits a warning + job summary telling an operator to run the manualdeploy-core/deploy-proxy— so core config can't silently lag (the exact gap that stranded the NATS binding).release.yml→deploy-prodwith manual approval) is untouched.Design rationale (sourced)
latest— Docker image digests, ditchlatest.Follow-ups (not here)
@sha256:) rather than the SHA tag for the strongest guarantee — needs a small compose change toimage: …@${DIGEST}.release.ymlstill deploys staging on release (the released semver tag); harmless overlap, can be trimmed later.Testing
actionlintclean. No app code changed;.github/only, so no changeset required.🤖 Generated with Claude Code