There are two situations:
1) On a failed build, from the docs
Optionally, if the run failed, to re-run the workflow, in the upper-right corner of the workflow, use the Re-run checks drop-down menu, and select Re-run all checks.
2) If your run did not fail, you have to trigger the event which your workflow runs on:
.
In the most usual case of on: push
, you can add an empty commit to poke GitHub actions:
git commit --allow-empty -m "trigger GitHub actions"
git push
This will add an empty commit (no files changed), and will trigger another push
event on GitHub, and therefore trigger another workflow run.
This does, however, muck up the commit history.
You can later squash/remove these if you like, but it's perhaps not ideal.
This is an update to my original answer, which referred to GitHub Actions HCL-based v1, prior to the August 2019 YAML-based re-release.
@tuff got this right first, with @instantepiphany‘s caveat.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…