From 0a3f190dd3375fe2a71f38728adcb012c9941d5b Mon Sep 17 00:00:00 2001 From: Jiahao XU Date: Mon, 30 Sep 2024 23:59:07 +1000 Subject: [PATCH] Add auto cancellation for CI jobs when pushing new commits to the PR, cancel the previous jobs Signed-off-by: Jiahao XU --- .github/workflows/main.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 2049b6dce..47040d016 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -6,6 +6,10 @@ env: CARGO_REGISTRIES_CRATES_IO_PROTOCOL: sparse CC_ENABLE_DEBUG_OUTPUT: true +concurrency: + group: ${{ github.workflow }}-${{ github.ref || github.event.pull_request.number || github.sha }} + cancel-in-progress: true + jobs: test: name: Test