act: Run GitHub Actions Locally
act runs your GitHub Actions workflows on your own machine using Docker, so you can test a .github/workflows/ change without committing and pushing just to see if a step works. Reach for act when you're iterating on a workflow file or want your CI job definitions to double as a Makefile replacement; skip it if your workflows depend on hosted-runner specifics a local Docker container can't reproduce.
Understanding act's Local Workflow Execution
act is a command-line tool that reads the workflow files in a repo's .github/workflows/ folder and runs the actions locally instead of on GitHub's servers. It works out which jobs need to run based on their dependencies, calls the Docker API to fetch or assemble the images those jobs specify, then runs each job in its own container with environment variables and a filesystem layout set to mirror GitHub's own setup.
Core Capabilities of act
- ✓Reads workflow files straight from .github/workflows/ and works out the execution order from job dependencies before running anything.
- ✓Calls the Docker API to fetch or assemble the container images a workflow references, rather than requiring you to prepare images by hand.
- ✓Runs each action inside its own container, with environment variables and a filesystem layout set to mirror GitHub's own setup.
- ✓Can stand in for a Makefile: workflows already written for GitHub Actions become the same commands you run locally, so logic doesn't live in two places.
- ✓Has a companion VS Code extension, GitHub Local Actions, built by a separate maintainer, for running and managing act without leaving the editor.
- ✓Ships as a Go project under the MIT license that you can build yourself with Go 1.20+ and make, if you'd rather not use a packaged release.
Practical Applications for act
- •Checking that a change to a workflow YAML file actually runs the way you expect before pushing it and waiting on GitHub's queue.
- •Replacing a project's Makefile with the same job definitions already written for CI, so there's one script to maintain instead of two.
- •Debugging a failing step by rerunning just that part of the workflow locally instead of re-triggering the whole pipeline on GitHub.
- •Running act from inside VS Code via the GitHub Local Actions extension when you'd rather not switch to a terminal.
Getting Started: Installing act
The only install path documented in the facts here is building from source: install Go 1.20 or newer, clone the repo with git clone [email protected]:nektos/act.git, run the unit tests with make test, then build and install with make install. The README also points to a separate user guide at nektosact.com for fuller documentation, so a packaged binary or package-manager command isn't clearly documented here; treat anything beyond the make install path as not covered by these facts.
Running Your GitHub Workflows Locally
Running act comes down to invoking it from a repo that has a .github/workflows/ directory. It reads those files, works out which jobs need to run, and calls the Docker API to fetch or assemble the images each job needs before executing them in containers. The README frames this around two specific use cases: fast feedback on workflow edits without a commit-and-push cycle, and using the same GitHub Actions definitions as a local task runner instead of a Makefile. In practice, that means running act right after editing a workflow file. Flags and command syntax beyond that entry point aren't part of the facts here; the README defers to the user guide at nektosact.com for the rest.
Strengths
- ✓Turns editing a workflow file into an edit-and-run loop instead of an edit-commit-push-wait loop, since act runs the same file locally.
- ✓Matches GitHub's own environment variables and filesystem, per the README, so a passing local run maps closely to what a hosted runner would see.
- ✓Reuses .github/workflows/ as your local task runner instead of maintaining a separate Makefile with duplicated logic.
- ✓MIT-licensed, so there's no restriction on how you use or modify it inside a company's tooling.
- ✓Has a VS Code extension in its ecosystem, GitHub Local Actions, for people who'd rather stay in their editor than run act from a terminal.
Considerations When Using act
- △The facts here document only a from-source build (Go 1.20+, make test, make install); no packaged binary or package-manager command is described in the README excerpt provided.
- △Docker is a prerequisite. The README assumes you already have it, rather than walking through installing or configuring it.
- △The GitHub Local Actions VS Code extension is built and maintained separately from act, per the README's own note, so it's a third-party layer rather than an official act feature.
- △The README leans on an external user guide at nektosact.com for most day-to-day command and flag documentation rather than including it inline.
Alternative Approaches to Workflow Testing
Frequently Asked Questions about act
act is used for running the workflows in a repo's .github/workflows/ folder on your own machine, either for fast feedback while editing a workflow instead of committing and pushing to test it, or as a local task runner that replaces a Makefile.
Yes. act calls the Docker API to fetch or assemble the images a workflow specifies, then runs each job inside a container, so a working Docker setup is necessary before you run it.
Yes, per act's own README: the actions defined in .github/workflows/ can serve as your local task runner, so you don't have to keep a separate Makefile with duplicated commands.
act is released under the MIT license, according to its GitHub repository.
Yes. The README points to GitHub Local Actions, a Visual Studio Code extension built by a separate maintainer that runs and manages act without leaving the editor.
act sets each job's container environment variables and filesystem to mirror what GitHub's own hosted runners use, according to the README's explanation of how act works.
The problem it solves
Testing a GitHub Actions workflow normally means editing .github/workflows/*.yml, committing, pushing, and waiting for GitHub's runners to pick up the job, then repeating that loop for every typo or missing environment variable. act's README frames its reason for existing around cutting that specific loop: run the same workflow files against Docker on your own machine and see the result right away, or use those same files as your project's task runner instead of hand-writing a Makefile that duplicates the same commands.
Who should try it — and who should skip
Try act if you're actively editing .github/workflows/ files and are tired of the commit-push-wait cycle just to see whether a step runs, or if you want your CI job definitions to double as your local task runner instead of writing a separate Makefile. Skip it if your team rarely touches workflow files, or if you need hosted-runner parity beyond what's documented: the facts here describe environment variables and filesystem matching GitHub's setup, not a guarantee that every hosted-runner behavior is reproduced locally.
Related repositories
Is act worth your time?
ChatGPT, Claude and Perplexity can all read this page. Ask one of them what it makes of act.
