What is the GitHub-native mechanism to pause a CI/CD pipeline and wait for human approval before proceeding?
Select an answer to reveal the explanation.
Short Explanation and Infographic
Deployment environments with required reviewers are the built-in approval gate — the job pauses until named people click Approve.
Full explanation below image
Full Explanation
GitHub's native approval mechanism for pipelines is the deployment environment feature. Create an environment (e.g., 'production') in repository Settings → Environments, add required reviewers, then assign that environment to the job that needs approval: 'environment: production'. When the workflow reaches that job, it pauses and sends notifications to the reviewers, who can Approve or Reject in the GitHub UI. The job proceeds only after approval. 'approval: required' doesn't exist as a field. 'actions/wait-for-approval' is not an official GitHub action. The workflow_dispatch pattern is a workaround, not the native solution.