What is act and how does it work?
masteract is a tool that allows you to run GitHub Actions locally. It provides fast feedback by letting you test .github/workflows/ files without committing and pushing to GitHub, and it can serve as a local task runner to replace tools like make using your existing GitHub Actions definitions.
How it works:
- Parsing:
actreads your GitHub Actions from the.github/workflows/directory. - Dependency Resolution: It determines the set of actions required and the execution path based on defined dependencies.
- Image Preparation: It uses the Docker API to pull or build the necessary images defined in your workflow files.
- Execution: It uses the Docker API to run containers for each action. The environment variables and filesystem are configured to match the GitHub-hosted runner environment.