Closed jmettes closed 3 years ago
Hmm still burning some carbon in the "Checks" below
It looks the CI will still always run on pull requests, even if "skip ci" is included inside the commit message.
This is because the approach for skipping relies on checking the commit messages inside the event metadata, which triggered the CI. It turns out that pull request event metadata does not contain a list of commit messages, so there's no way to check if they contain "skip ci".
We could check for the title of the PR, and include "skip ci" in there.
Alternatively, a "pre_ci" workflow step could be added to manually parse git commit messages, and then used to skip subsequent workflow steps: https://github.community/t/accessing-commit-message-in-pull-request-event/17158/9
@jmettes , thank you for confirming the change works. I will merge it in now.
I will checkout the pre_ci
step you tagged in the commit above. It looks promising.
It works: https://github.com/GeoscienceAustralia/PyRate/actions/runs/497579479