Browse Source

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
Philipp Schuster 8 tháng trước cách đây
mục cha
commit
9b2532dc6e
1 tập tin đã thay đổi với 4 bổ sung0 xóa
  1. 4 0
      .github/workflows/rust.yml

+ 4 - 0
.github/workflows/rust.yml

@@ -11,6 +11,10 @@ name: "Cargo workspace"
 # Run on every push (tag, branch) and pull_request
 on: [ pull_request, push, workflow_dispatch, merge_group ]
 
+concurrency:
+  group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
+  cancel-in-progress: true
+
 env:
   CARGO_TERM_COLOR: always