cancel-workflow-action
cancel-workflow-action copied to clipboard
Cancel previous runs of same workflow id on all branches
Scenario: I have a content branch and a master branch. An identical workflow runs in case of push to either branches, resulting in race condition.
Expection: I would like to be able to cancel prior workflow runs irrespective of the branch. README file makes me think that this is currently not supported -
this GitHub Action will capture the current Branch and SHA. It will query GitHub's API to find previous workflow runs that match the Branch but do not match the SHA.
Example of the race conditions I want to avoid with this feature (from here):
Indeed, the branch is necessary https://github.com/styfle/cancel-workflow-action/blob/ad6cb1b847ffb509a69b745b6ee2f1d14dfe14b8/src/index.ts#L22-L30
We might be able to add an option for ignore_branch: true
to only use the SHA 🤔
We might be able to add an option for
ignore_branch: true
to only use the SHA
That's indeed what I seek!
Great! Do you want to submit a PR?
Great! Do you want to submit a PR?
Much as I'd like to contribute, I don't have the bandwidth to learn this system and make the fix myself :-(