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_TOKENthat is included in every repo, it is added here. ReplaceYOUR_TOKEN_HEREwith a personal access token from GitHub. - On computers with Apple's m-series chip, the
--container-architecture linux/amd64flag is required - The
-rflag allows for containers from jobs to be reused, making for faster jobs.