Skip to content

GitHub Actions

Gaël Poupard edited this page Jan 25, 2021 · 8 revisions

Run GitHub actions again

In case you're facing a workflow that doesn't cancel and cannot be re-run, the only way I found is to trigger a new build using an empty commit:

git commit --allow-empty -m "chore(tests): trigger Github Actions"

I recommend using this exact commit message to ease their identification.

Required checks early bail

Some checks are set as required to protect branches, but should not be triggered if related files are left unchanged. So instead of adding paths conditions for each workflow —which would prevent them from running albeit being required, so you'd get stuck with actions "waiting for statuses"— there're a few labels to set on your PR to make them bail early:

These labels should not be used to ignore failing actions.

GitHub does not allow to skip required checks if paths doesn't match, which is a shame. Alternatives to what I'v done here are:

  • use paths to completely prevent actions from starting: they'd get stuck as "waiting" but team members could still use their administrator privileges to merge.
  • add a doublon action with the same name but the opposite conditions— that will success every time. Mostly a hack.
Clone this wiki locally