How to run GitHub Action locally with act
.
- Bun — A fast all-in-one JavaScript runtime
- Introduction - act - User Guide
- OrbStack · Fast, light, simple Docker & Linux on macOS
- Docker or a compatible container engine (e.g., OrbStack, Podman)
act
installed. You can install it via Homebrew:brew install act
Clone your repository to your local machine:
gh repo clone jellydn/github-action-locally
Then run
bun install
Run all GitHub Action workflows defined in your .github/workflows/
folder:
act
act -l
Run a specific job from your workflow file:
act -j <job-name>
Specify a custom Docker image for the runner:
act -P <platform>=<docker-image>
Example:
act -P ubuntu-18.04=nektos/act-environments-ubuntu:18.04
If you prefer to use Podman:
export DOCKER_HOST='unix:///var/run/podman/podman.sock'
act
Or, with a remote Docker engine:
DOCKER_HOST='ssh://user@host' act
Even though if you don't know where is the Docker socket, you can use the following:
docker context ls --format json | jq
Then you would have similar output:
{
"Current": false,
"Description": "Current DOCKER_HOST based configuration",
"DockerEndpoint": "unix:///var/run/docker.sock",
"Error": "",
"Name": "default"
}
{
"Current": true,
"Description": "OrbStack",
"DockerEndpoint": "unix:///Users/huynhdung/.orbstack/run/docker.sock",
"Error": "",
"Name": "orbstack"
}
If you encounter issues, please refer to the official act
User Guide or open an issue in this repository.
👤 Huynh Duc Dung @jellydn
- Website: https://productsway.com/
- Twitter: @jellydn
- Github: @jellydn
Give a ⭐️ if this project helped you!