Find your next open-source project

Search by name, purpose, or keyword — or paste a GitHub repository URL
All skills

gating-production-deploys

Add the CD_DEPLOY_ENABLED gate to GitHub Actions steps that push production images or dispatch Charts deploys.

When to use it

You are editing a workflow that builds a container image on master and need to stop it publishing from the wrong repo.

For example

You say

Use gating-production-deploys to add the deploy gate to a new workflow that pushes a worker image to ECR on master pushes.

You get
  • Gated push step
  • Gated deploy job condition

How it works

  • Gate only the master arm of a build job that also serves pull requests, so contributor CI keeps working.
  • Release workflows for GitHub releases, npm, crates, and Homebrew stay ungated on the public repo.

Before installing

The CD_DEPLOY_ENABLED repository variable must be set on the repo that should ship before merging, or master pushes skip the build and deploy.