Skip to content

Instantly share code, notes, and snippets.

@GroovinChip
Created July 7, 2022 21:03
Show Gist options
  • Save GroovinChip/fba3ddeaf565a6834d7fc6968f855612 to your computer and use it in GitHub Desktop.
Save GroovinChip/fba3ddeaf565a6834d7fc6968f855612 to your computer and use it in GitHub Desktop.
act alias for m1 chips with GH token & resusing containers

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. Replace YOUR_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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment