瀏覽代碼

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 月之前
父節點
當前提交
9b2532dc6e
共有 1 個文件被更改,包括 4 次插入0 次删除
  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