From 5f2c0509731bd906003e92f436a935ef5e952621 Mon Sep 17 00:00:00 2001 From: Frank Osterfeld Date: Fri, 6 Dec 2024 16:29:23 +0100 Subject: [PATCH] CI: Cancel existing builds when PR branch is updated Signed-off-by: Frank Osterfeld --- .github/workflows/ci.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b4eebe92..be36615c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -61,6 +61,10 @@ jobs: name: "${{ matrix.compiler.cc }} | ${{ matrix.cmake-build-type }}" needs: buildAndPublishDocker runs-on: "ubuntu-latest" + concurrency: + # Cancel running builds inside work (PR) branches, build all revisions for the main branch + group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}-${{ matrix.compiler.cc }}-${{ matrix.cmake-build-type }} + cancel-in-progress: true container: image: "${{ needs.buildAndPublishDocker.outputs.container }}" strategy: