Преглед изворни кода

ci(alpha): avoid race by cancel non-latest concurrent runs (#1213)

Sukka пре 11 месеци
родитељ
комит
19b6f78c8a
1 измењених фајлова са 4 додато и 0 уклоњено
  1. 4 0
      .github/workflows/alpha.yml

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

@@ -9,6 +9,10 @@ permissions: write-all
 env:
   CARGO_INCREMENTAL: 0
   RUST_BACKTRACE: short
+concurrency:
+  # only allow per workflow per commit (and not pr) to run at a time
+  group: "${{ github.workflow }} - ${{ github.head_ref || github.ref }}"
+  cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
 
 jobs:
   alpha: