From 417cee3a3f0d78b63ac0187d04399aaf16016af7 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 b4eebe922..18ee04cc9 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.head_ref || github.run_id }} + cancel-in-progress: true container: image: "${{ needs.buildAndPublishDocker.outputs.container }}" strategy: