I am planning to move our Travis CI build to GitHub Actions using Docker for our per-commit testing.
Can I reproducibly run these new GitHub Actions workflows locally? Is there a generic way to run any GitHub Actions workflow locally?
github/workflows/ files (or for any changes to embedded GitHub actions), you can use act to run the actions locally. The environment variables and filesystem are all configured to match what GitHub provides.
On GitHub.com, navigate to the main page of the repository. Under your repository name, click Actions. In the left sidebar, click the workflow you want to run. Above the list of workflow runs, select Run workflow.
Workflows are defined in the . github/workflows directory in a repository, and a repository can have multiple workflows, each of which can perform a different set of tasks.
There are tools like the already-mentioned act
, but they are not perfect. You are not alone with this issue. Similar problems are:
And my solution for these problems is:
run: your command to run
You can use nektos/act which supports yaml syntax since 0.2.0 (prerelease).
Check out their latest release.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With