From 40e2a64e7658cac49746672e0b8763bb8db2e394 Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade Date: Sat, 8 Oct 2022 21:21:38 +0200 Subject: [PATCH] [3.10] Auto-cancel old builds when new commit pushed to branch (GH-98009) * Auto-cancel old builds when new commit pushed to branch * Add a fallback Co-authored-by: Ezio Melotti * Use the same group for all workflows. Co-authored-by: Ezio Melotti (cherry picked from commit 75751f4aa5d70f65856645a9128fd42d92d6692c) Co-authored-by: Hugo van Kemenade --- .github/workflows/build.yml | 4 ++++ .github/workflows/build_msi.yml | 4 ++++ .github/workflows/doc.yml | 4 ++++ .github/workflows/verify-ensurepip-wheels.yml | 4 ++++ 4 files changed, 16 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index c0744ce5033f3e..ba23c72586d49e 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -22,6 +22,10 @@ on: permissions: contents: read +concurrency: + group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} + cancel-in-progress: true + jobs: check_source: name: 'Check for source changes' diff --git a/.github/workflows/build_msi.yml b/.github/workflows/build_msi.yml index 04917ff184aa64..0eba92e1c84438 100644 --- a/.github/workflows/build_msi.yml +++ b/.github/workflows/build_msi.yml @@ -23,6 +23,10 @@ on: permissions: contents: read +concurrency: + group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} + cancel-in-progress: true + jobs: build_win32: name: 'Windows (x86) Installer' diff --git a/.github/workflows/doc.yml b/.github/workflows/doc.yml index eb4884a487325a..3bc280be95f31e 100644 --- a/.github/workflows/doc.yml +++ b/.github/workflows/doc.yml @@ -23,6 +23,10 @@ on: permissions: contents: read +concurrency: + group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} + cancel-in-progress: true + jobs: build_doc: name: 'Docs' diff --git a/.github/workflows/verify-ensurepip-wheels.yml b/.github/workflows/verify-ensurepip-wheels.yml index 61e3d1adf534d5..9f4754f912b09f 100644 --- a/.github/workflows/verify-ensurepip-wheels.yml +++ b/.github/workflows/verify-ensurepip-wheels.yml @@ -16,6 +16,10 @@ on: permissions: contents: read +concurrency: + group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} + cancel-in-progress: true + jobs: verify: runs-on: ubuntu-latest