Cancel workflows when one of them fail on temporary branch #5171
andrzejressel
started this conversation in
Ideas
Replies: 1 comment
|
Hi! Mergify does close the draft PR and delete its branch before starting the retry, so from the engine side the old ref is gone. The catch is that GitHub Actions does not automatically cancel in-progress workflow runs when the branch they were triggered on is deleted — The standard fix is to add a concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: trueWith that in place, when Mergify recreates the temporary branch for the retry (same ref name), GitHub Actions will cancel the previous run on that ref instead of letting your 140 jobs run to completion. |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Hi,
I'm currently using
max_checks_retriesin my project and I've noticed that when one GH Actions job fails, new branch is immediately opened, but the old jobs are still running. For example:andrzejressel/pulumi-gestalt#2293 (comment)
First branch was closed pretty fast (after 4 minutes), but the jobs were still running. It's an issue in my example, because I have ~140 jobs and I'd rather have them all cancelled if the current temporary mergify.io branch won't be merged anyway.
All reactions