From a9a043eb8728ce60ce81e473b99e389e583a2502 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..5dbdfa9b 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 + group: ${{ github.head_ref }} + cancel-on-progress: ${{ github.ref != 'refs/heads/main' }} container: image: "${{ needs.buildAndPublishDocker.outputs.container }}" strategy: