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.
## 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
```bash
# 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 -l` to list all jobs before running.
- Pin container images to match your runner (`--container-architecture linux/amd64` if needed).
- For services (Postgres, Redis), use `--service` or define them in workflow services.
- Keep `.secrets` out 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).
Related Articles
2026-06-29
The Mainline Dragon Strategy โ Chasing the Leader Without Paying for Data
2026-06-29
The AI Hiding in Your Laptop
2026-07-14
Free AI Coding Assistant Setup 2026: 5-Min VS Code Guide (Continue, Copilot, Windsurf)
