Skip to content

Commit 7db7232

Browse files
committed
Cancel in-progress jobs on updated push
At times, PRs can go through multiple pushes in a short amount of time, spawning a workflow run for each. Most of the time, there's no need to let the previous jobs running if the code itself has changed (e.g., via a force push), and we'd benefit from having those slots be used by other PRs/branches instead.
1 parent f471a1b commit 7db7232

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

.github/workflows/build.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@ on:
88
branches-ignore:
99
- master
1010

11+
concurrency:
12+
group: ${{ github.workflow }}-${{ github.ref }}
13+
cancel-in-progress: true
14+
1115
jobs:
1216
build:
1317
strategy:

0 commit comments

Comments
 (0)