You can run GitHub actions locally with a CLI tool called nektos/act which reads your
.github workflows and determines the actions that need to run:
Act uses Docker to pull or build the necessary images that are defined in your workflow. It then uses the Docker API to run containers for each action based on the images provided and the environment variables are set up to match GitHub.
This CLI has installation instructions for various package managers and systems. Once you get it installed and configured, here are some commands you can try:
act -l # lists all the actions for all the eventsact workflow_dispatch -l # list actions for a specific event# Run a specific eventact pull_request# Run a specific jobact -j test# Collect artifacts to a given folder 😱act --artifact-server-path /tmp/artifacts# Dry run modeact -n