From 058cac9211d41eed80c2b27229d6b34933cdc5e6 Mon Sep 17 00:00:00 2001 From: Piotr Zajac Date: Thu, 14 Dec 2023 18:16:02 +0100 Subject: [PATCH] Cancel in-progress runs for the current workflow on particular branch --- .github/workflows/cicd.yml | 4 ++++ .github/workflows/codeql.yml | 4 ++++ .github/workflows/fossa-scan.yml | 4 ++++ .github/workflows/test-mutations.yml | 4 ++++ 4 files changed, 16 insertions(+) diff --git a/.github/workflows/cicd.yml b/.github/workflows/cicd.yml index 8a40ae1e..44a35a82 100644 --- a/.github/workflows/cicd.yml +++ b/.github/workflows/cicd.yml @@ -47,6 +47,10 @@ defaults: run: shell: pwsh +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + jobs: init: permissions: diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index ed146706..4eaabc0f 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -25,6 +25,10 @@ defaults: run: shell: pwsh +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + jobs: analyze: runs-on: ubuntu-latest diff --git a/.github/workflows/fossa-scan.yml b/.github/workflows/fossa-scan.yml index febaa47b..88933ded 100644 --- a/.github/workflows/fossa-scan.yml +++ b/.github/workflows/fossa-scan.yml @@ -14,6 +14,10 @@ on: - '.github/workflows/fossa-scan.yml' workflow_dispatch: +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + jobs: scan: runs-on: ubuntu-latest diff --git a/.github/workflows/test-mutations.yml b/.github/workflows/test-mutations.yml index e7073a45..0cbe485a 100644 --- a/.github/workflows/test-mutations.yml +++ b/.github/workflows/test-mutations.yml @@ -27,6 +27,10 @@ defaults: run: shell: pwsh +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + jobs: test: runs-on: ubuntu-latest