How to Use Approval Jobs in CircleCI
An approval job pauses a workflow until someone clicks Approve in the UI, turning a deploy into a gated manual action.
Add a job with type: approval and make the deploy job requires: it. The workflow halts at the approval until a user approves, then continues.
Gate deploy behind approval
The hold job waits for a click; only then does deploy run.
.circleci/config.yml
version: 2.1
workflows:
release:
jobs:
- build
- hold:
type: approval
requires: [build]
- deploy:
requires: [hold]
filters:
branches:
only: mainGotchas
- An approval job has no
steps:; it is purely a gate. - Restrict who can approve via project or org permissions for production safety.
- Combine with a context so the approved deploy job gains production secrets only after sign-off.
Key takeaways
type: approvalpauses a workflow for a manual click.- Downstream jobs
requires:the approval job to gate them. - Limit approvers with permissions for production deploys.