Skip to content
Latchkey

How to Reproduce a Workflow Locally With act in GitHub Actions

act runs your workflow jobs in local Docker containers so you can reproduce a failure without pushing commits.

Install act, then run act <event> from the repo root. It reads .github/workflows, builds the job graph, and executes steps in containers that approximate the hosted runners.

Steps

  • Install act (brew install act or the install script).
  • Run act push (or another event) at the repo root.
  • Pass secrets and a larger image when a job needs them.

Common commands

Terminal
# list the jobs act would run for the push event
act push -l
# run a single job by id
act -j build
# provide a secret and use a fuller ubuntu image
act -j build -s GITHUB_TOKEN=ghp_xxx \
  -P ubuntu-latest=catthehacker/ubuntu:act-latest

Gotchas

  • act emulates runners but is not identical; services:, some uses: actions, and OIDC may differ.
  • The default micro image lacks many tools; map a catthehacker/ubuntu image with -P.
  • macOS and Windows runners cannot be reproduced; act runs Linux containers.

Related guides

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