mcpField
A
act

act

OfficialAgent-ready
github.comDeveloper Tools72.5kactUpdated today
RepositoryVisit website

About act

act enables developers to execute GitHub Actions workflows in a local environment without pushing to a repository. It supports multiple event types and job configurations, allowing rapid iteration and debugging of CI/CD pipelines before committing changes.

Key features

  1. 01Execute GitHub Actions workflows in local containers
  2. 02Support multiple trigger events including pull_request and push
  3. 03Run specific jobs to accelerate feedback cycles
  4. 04Cross-platform compatibility with existing development tools

Use cases

  1. 01Validate CI pipeline configuration locally before committing
  2. 02Debug workflow logic and environment variables in isolation
  3. 03Test GitHub Actions offline to reduce repository pushes

Install

Pick your OS or package manager and run the command in a terminal.

$
brew install act

Once installed, runact --versionto confirm it works.

Example commands

Common commands in the order you’d use them.

01
act
02
act pull_request
03
act -j test

Details

From the project README

act-logo

Overview push Go Report Card awesome-runners

"Think globally, act locally"

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 use act to 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 your Makefile!

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.

How Does It Work?

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 Docker API 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 Docker API 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!

Demo

Act User Guide

Please look at the act user guide for more documentation.

Support

Need help? Ask in discussions!

Contributing

Want to contribute to act? Awesome! Check out the contributing guidelines to get involved.

Manually building from source

Comments

Markdown supported