Skip to content

ci: skip deploy jobs until DEPLOY_ENABLED is set#21

Merged
kosminus merged 1 commit into
mainfrom
ci/gate-deploys-behind-variable
Jun 10, 2026
Merged

ci: skip deploy jobs until DEPLOY_ENABLED is set#21
kosminus merged 1 commit into
mainfrom
ci/gate-deploys-behind-variable

Conversation

@kosminus

Copy link
Copy Markdown
Owner

What

Gates the Release workflow's deploy jobs behind a DEPLOY_ENABLED repository variable so they skip cleanly instead of failing when no cluster is configured.

Why

The Release workflow has failed on every push to main since it landed (#18): deploy-staging runs helm upgrade against an empty kubeconfig because the staging environment has no KUBE_CONFIG secret — there's no staging cluster yet. The image build + push half of the workflow works fine; only the deploy half can't succeed. A permanently red workflow trains everyone to ignore CI.

Changes

  • .github/workflows/release.yml:
    • deploy-staging and deploy-prod now require vars.DEPLOY_ENABLED == 'true' in addition to their existing ref conditions — without it they show as skipped and the workflow goes green, while images still build and push to GHCR on every main push and v* tag
    • Header comment documents the enablement steps (set the variable + the per-environment KUBE_CONFIG secret)
  • deploy/README.md: added DEPLOY_ENABLED to the "Required GitHub config" table

To turn deploys on later: Settings → Secrets and variables → Actions → VariablesDEPLOY_ENABLED=true, plus the base64 kubeconfig as the KUBE_CONFIG secret on each environment. No workflow changes needed.

Validated with actionlint.

🤖 Generated with Claude Code

The Release workflow has failed on every main push since it landed:
the deploy-staging job runs helm against an empty kubeconfig because
no staging cluster (and no KUBE_CONFIG secret) exists yet.

Gate deploy-staging and deploy-prod on the repository variable
DEPLOY_ENABLED == 'true' so they show as skipped instead of failed,
while image build + push to GHCR keeps running. When a cluster exists,
enabling deploys is one variable plus the KUBE_CONFIG environment
secret — documented in the workflow header and deploy/README.md.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@kosminus kosminus merged commit 1e1c3e4 into main Jun 10, 2026
6 checks passed
@kosminus kosminus deleted the ci/gate-deploys-behind-variable branch June 10, 2026 04:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant