Act (71,347 Stars) 2026: Run GitHub Actions Locally Before You Push - Complete Workflow Testing Guide
Act (71,347 stars) runs your GitHub Actions workflows locally in Docker, so you can test CI before pushing. Here is how to set it up and debug workflows faster.
💡 What You Will Learn
Act (71,347 stars) runs your GitHub Actions workflows locally in Docker, so you can test CI before pushing. Here is how to set it up and debug workflows faster.
📜 Table of Contents
The short answer
nektos/act (71,347 stars, Go) runs GitHub Actions locally. It executes your workflow files in Docker containers that mimic the GitHub-hosted runner environment, so you can test, debug, and iterate on CI without waiting for pushes and without burning Actions minutes.
Why developers love it
- Instant feedback: test a workflow in seconds, not minutes
- Zero cost: no Actions minutes consumed for local runs
- Real environment: containers match the runner images closely
- Secrets safe: secrets stay local, not in GitHub logs
Install and run
# macOS
brew install act
# Windows (choco) / Linux (curl)
curl -s https://raw.githubusercontent.com/nektos/act/master/install.sh | sudo bash
# Run the default workflow (push event)
act
# Simulate a pull request
act pull_request
# Run a specific job
act -j build
# Dry run - see what would execute
act -n
Configuring secrets locally
Create .secrets in your repo root (git-ignored):
GITHUB_TOKEN=ghp_xxx
MY_API_KEY=sk-xxx
Then run act --secret-file .secrets. For local env vars, use --env-file .env.
Practical tips
- Use
act -lto list all jobs before running. - Pin container images to match your runner (
--container-architecture linux/amd64if needed). - For services (Postgres, Redis), use
--serviceor define them in workflow services. - Keep
.secretsout of git - add it to.gitignore.
FAQ
Does it support all GitHub Actions features? Most of them - matrix builds, caching, and composite actions work; a few platform-specific behaviors differ.
Do I need Docker? Yes - act runs jobs in Docker containers.
Is it free? Yes - open source (MIT).
❓ FAQ
Does it support all GitHub Actions features?
Most of them - matrix builds, caching, and composite actions work; a few platform-specific behaviors differ.
Do I need Docker?
Yes - act runs jobs in Docker containers.
Written by our editorial team; tools listed here are tested or verified against public sources. Links point to official sites or GitHub repos for reference only โ no paid placements.
