From 44c4fa8291860ca24fcfade5ed465e5ff3ecaa95 Mon Sep 17 00:00:00 2001 From: PoAn Yang Date: Tue, 10 Dec 2024 15:28:46 +0800 Subject: [PATCH] feat(ci): cancel in progress CI if there is new commit (#865) Signed-off-by: PoAn Yang (cherry picked from commit 4b9e7fe990e44c5f5d4a423831393bedab3be203) --- .github/workflows/build.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 79568097c..6c9254692 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -12,6 +12,9 @@ env: # something like "697/merge", which doesn't work as a version, # so wet just set it to master in this case. DRONE_BRANCH: ${{ endsWith(github.ref_name, '/merge') && 'master' || github.ref_name }} +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: ${{ github.ref != 'refs/heads/master' && !startsWith(github.ref, 'refs/heads/v') && !startsWith(github.ref, 'refs/tags/v') }} jobs: build-iso: name: Build ISO Images