Debugging GitHub Actions workflows on remote cloud runners is painfully slow: you push a commit, wait 3 minutes for runner queuing, watch the job fail due to a tiny shell typo or missing environment variable, push another commit, and repeat. act (by nektos) reads your repository's .github/workflows/ directory, determines which jobs need to run, and executes them inside local Docker containers matching GitHub's runner specifications.
Everyday `act` Commands
# Run the default 'push' event workflow
act
# Simulate a pull request trigger
act pull_request
# Run a specific job by ID
act -j test
# Pass secrets securely from a local .secrets file
act --secret-file my.secrets
act Local Execution Architecture
Docker Runner Sizes in `act`
| Image Tier | Size | Pre-Installed Tools |
|---|---|---|
| Micro (Default) | ~200 MB | Node.js, Docker CLI only |
| Medium | ~500 MB | Node, Python, Go, Git, common tools |
| Full (GitHub Match) | ~18 GB | Identical to official GitHub virtual environments |
If your workflow steps run docker commands (e.g. docker build or docker compose), act requires access to the host's Docker daemon. You must pass the flag: act --bind or configure container socket mounting. Without this, steps attempting to build containers will fail with Cannot connect to the Docker daemon at unix:///var/run/docker.sock.
Learn more at the official act repository on GitHub.
Discussion & Issues
Comments
Post a Comment