act is a tool for running GitHub actions locally. Commands can get very unwieldy so I've created an alias in my .zshrc
file that makes things easier:
alias actm="act -s GITHUB_TOKEN=YOUR_TOKEN_HERE --container-architecture linux/amd64 -r"
Breakdown:
- Since some actions require the
GITHUB_TOKEN
that is included in every repo, it is added here. ReplaceYOUR_TOKEN_HERE
with a personal access token from GitHub. - On computers with Apple's m-series chip, the
--container-architecture linux/amd64
flag is required - The
-r
flag allows for containers from jobs to be reused, making for faster jobs.