From 46cacb7f587fb583f70f548afc928bc4761d20da Mon Sep 17 00:00:00 2001 From: Radkesvat <134321679+radkesvat@users.noreply.github.com> Date: Tue, 18 Jun 2024 19:07:17 +0000 Subject: [PATCH] cancel in-progress workflows when new commit arrives --- .github/workflows/cmake-mingw-windows.yml | 4 ++++ .github/workflows/cmake-multi-android.yml | 5 ++++- .github/workflows/cmake-multi-linux.yml | 4 ++++ .github/workflows/cmake-multi-macos.yml | 4 ++++ 4 files changed, 16 insertions(+), 1 deletion(-) diff --git a/.github/workflows/cmake-mingw-windows.yml b/.github/workflows/cmake-mingw-windows.yml index d876645a..ee5fcf54 100644 --- a/.github/workflows/cmake-mingw-windows.yml +++ b/.github/workflows/cmake-mingw-windows.yml @@ -6,6 +6,10 @@ on: pull_request: branches: [ "main" ] +concurrency: + group: ${{ github.workflow }}-${{ github.head_ref || github.ref }} + cancel-in-progress: true + jobs: build-mingw64: strategy: diff --git a/.github/workflows/cmake-multi-android.yml b/.github/workflows/cmake-multi-android.yml index 824e229a..ac009ddc 100644 --- a/.github/workflows/cmake-multi-android.yml +++ b/.github/workflows/cmake-multi-android.yml @@ -6,7 +6,10 @@ on: pull_request: branches: [ "main" ] - +concurrency: + group: ${{ github.workflow }}-${{ github.head_ref || github.ref }} + cancel-in-progress: true + jobs: build: runs-on: ${{ matrix.os }} diff --git a/.github/workflows/cmake-multi-linux.yml b/.github/workflows/cmake-multi-linux.yml index 45025be1..1f75b1bc 100644 --- a/.github/workflows/cmake-multi-linux.yml +++ b/.github/workflows/cmake-multi-linux.yml @@ -8,6 +8,10 @@ on: pull_request: branches: [ "main" ] +concurrency: + group: ${{ github.workflow }}-${{ github.head_ref || github.ref }} + cancel-in-progress: true + jobs: build: diff --git a/.github/workflows/cmake-multi-macos.yml b/.github/workflows/cmake-multi-macos.yml index aee414dd..5d2468b6 100644 --- a/.github/workflows/cmake-multi-macos.yml +++ b/.github/workflows/cmake-multi-macos.yml @@ -6,6 +6,10 @@ on: pull_request: branches: [ "main" ] +concurrency: + group: ${{ github.workflow }}-${{ github.head_ref || github.ref }} + cancel-in-progress: true + jobs: build: runs-on: ${{ matrix.os }}