Run your GitHub workflows locally, for lightspeed testing your workflow script and jobs.
Example: You have created a script that checks for changes and then
creates a branch and push changes to you main branch and creates a pull request.
For some extra creme, you have created a bot that comments the PR with information
about the automated changes.
Issue: It will take time to test this in a workflow in your CI setup, since there could be
several jobs that needs to be run or even be concluded with successful status.
Solution - nektos/act, run it lightspeed faster to test locally before you push it to repository.
Install vscode extension GitHub Local Actions
Tip! Pick any runner and start testing your workflows locally
See Runners and pick your poison.
Then add as runner in settings/options
(Can even run your own self-hosted)
Note! as of writing this, the image ubuntu:full-24.04 is in beta, so you if you use
ubuntu-24.04 in your workflows.
Just add the act image in your actrc file. Its beta though, and its huge 🤷
# actrc
-P ubuntu-24.04=catthehacker/ubuntu:full-24.04act images are slimmer, see Runners
Install act as a gh cli extension
gh extension install nektos/actUpgrade gh extension
gh extension upgrade nektos/actor just gh extension upgrade --all