Skip to content

Commit 83cc476

Browse files
eli-schwartzthesamesam
authored andcommitted
ci: cancel running jobs when a new workflow run is triggered via push
Previously, modifying a PR resulted in two workflows being active, both reserving job slots. But only the later one matters -- that is the whole point of ***updating*** a PR. Github doesn't cancel the old, outdated-logic jobs for you, but this concurrency setting does. This is especially important for crossdev, since crossdev has a matrix of 48 x 2 jobs, and a PR raised that instead to 48 x 3 for a grand total of 144 jobs. Each one can take hours. Github only gives you 20 concurrent jobs. Any time crossdev CI runs, nothing else in the github org can. At least avoid days-long waits for the next version of the PR. Signed-off-by: Eli Schwartz <[email protected]> Signed-off-by: Sam James <[email protected]>
1 parent cd67ec6 commit 83cc476

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

.github/workflows/crossdev.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@ on:
1010
schedule:
1111
- cron: 00 4 * * *
1212

13+
concurrency:
14+
group: ${{ github.head_ref || github.ref }}
15+
cancel-in-progress: true
16+
1317
jobs:
1418
crossdev:
1519
strategy:

0 commit comments

Comments
 (0)