"Think globally,
actlocally"
Run your GitHub Actions locally! Why would you want to do this? Two reasons:
- Fast Feedback - Rather than having to commit/push every time you want to test out the changes you are making to your
.github/workflows/files (or for any changes to embedded GitHub actions), you can useactto run the actions locally. The environment variables and filesystem are all configured to match what GitHub provides. - Local Task Runner - I love make. However, I also hate repeating myself. With
act, you can use the GitHub Actions defined in your.github/workflows/to replace yourMakefile!
Act supports both Docker and Podman with automatic detection:
- π Podman preferred for enhanced security (rootless, daemonless)
- π³ Docker fallback for maximum compatibility
- π Zero breaking changes - existing workflows continue to work
Tip
Now Manage and Run Act Directly From VS Code!
Check out the GitHub Local Actions Visual Studio Code extension which allows you to leverage the power of act to run and test workflows locally without leaving your editor.
When you run act it reads in your GitHub Actions from .github/workflows/ and determines the set of actions that need to be run. It uses the container runtime API (Docker or Podman) to either pull or build the necessary images, as defined in your workflow files and finally determines the execution path based on the dependencies that were defined. Once it has the execution path, it then uses the container runtime to run containers for each action based on the images prepared earlier. The environment variables and filesystem are all configured to match what GitHub provides.
Let's see it in action with a sample repo!
Act supports multiple container runtimes with automatic detection and seamless switching:
Act automatically detects and uses the best available container runtime:
- π Podman preferred - Better security (rootless, no daemon required)
- π³ Docker fallback - Broader compatibility and mature tooling
- βοΈ User override - Full control via CLI flags or environment variables
# Automatic detection (Podman preferred if available)
act
# Force specific runtime
act --container-runtime=podman
act --container-runtime=docker
# Custom socket path
act --container-socket=/run/user/$(id -u)/podman/podman.sock# macOS
brew install podman
podman machine init
podman machine start
# Ubuntu/Debian
sudo apt-get install podman
# Fedora/RHEL/CentOS
sudo dnf install podmanmacOS Note: Act automatically detects Podman machine sockets on macOS, including SSH-based connections. No manual configuration needed!
| CLI Flag | Environment Variable | Description |
|---|---|---|
--container-runtime |
ACT_CONTAINER_RUNTIME |
Set runtime: auto, docker, podman |
--container-socket |
ACT_CONTAINER_SOCKET |
Custom socket path |
- π Enhanced Security: Rootless containers by default
- π« Daemonless: No background daemon required
- β‘ Better Performance: Lower resource overhead
- π§ Linux Native: Better systemd integration
Zero Breaking Changes: All existing Docker workflows continue to work unchanged!
For detailed information, see Podman Support Documentation.
Please look at the act user guide for more documentation.
Need help? Ask in discussions!
Want to contribute to act? Awesome! Check out the contributing guidelines to get involved.
- Install Go tools 1.20+ - (https://golang.org/doc/install)
- Clone this repo
git clone [email protected]:nektos/act.git - Run unit tests with
make test - Build and install:
make install