From 19b6f78c8a0d1f0a4dbba0b37bf5472080e2a7fe Mon Sep 17 00:00:00 2001 From: Sukka Date: Sun, 16 Jun 2024 01:10:30 +0800 Subject: [PATCH] ci(alpha): avoid race by cancel non-latest concurrent runs (#1213) --- .github/workflows/alpha.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/alpha.yml b/.github/workflows/alpha.yml index 7b2cbe4..6579df0 100644 --- a/.github/workflows/alpha.yml +++ b/.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: