Skip to content
Latchkey

How to Run a Manual Approval Gate in GitHub Actions

Some deploys should wait for a human; a protected environment pauses the job until a named reviewer clicks approve.

Create an environment with required reviewers, then attach the gated job to it via environment:. The run pauses until approved.

Steps

  • Create an environment (e.g. production) in repo settings.
  • Add required reviewers and an optional wait timer.
  • Attach the gated job with environment: production.
  • The run pauses at that job until a reviewer approves.

Workflow

.github/workflows/deploy.yml
jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - run: ./build.sh
  deploy:
    needs: build
    runs-on: ubuntu-latest
    environment: production
    steps:
      - run: ./deploy.sh

Gotchas

  • Required reviewers are an environment setting, not workflow YAML; configure them in repo settings.
  • A pending approval holds a runner slot only briefly; the job waits without consuming compute.
  • Latchkey runs the approved job on cheaper runners that retry transient failures after the gate clears.

Related guides

Run this faster and cheaper on Latchkey managed runners. Start free →