Skip to content

Commit 9b2532d

Browse files
committed
ci: cancel previous runs when new pushes were made
This is more what is naturally expected. It saves CI time and it often prevents many already started runs that will fail anyway from running longer than necessary. See https://stackoverflow.com/questions/66335225
1 parent b296673 commit 9b2532d

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

.github/workflows/rust.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@ name: "Cargo workspace"
1111
# Run on every push (tag, branch) and pull_request
1212
on: [ pull_request, push, workflow_dispatch, merge_group ]
1313

14+
concurrency:
15+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
16+
cancel-in-progress: true
17+
1418
env:
1519
CARGO_TERM_COLOR: always
1620

0 commit comments

Comments
 (0)