Selaa lähdekoodia

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 kuukautta sitten
vanhempi
commit
9b2532dc6e
1 muutettua tiedostoa jossa 4 lisäystä ja 0 poistoa
  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