From 75751f4aa5d70f65856645a9128fd42d92d6692c Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade Date: Sat, 8 Oct 2022 21:21:38 +0200 Subject: [PATCH] Auto-cancel old builds when new commit pushed to branch (#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 --- .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 dc91c0dbcb0..8f5676eec08 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -25,6 +25,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 528679c0ac6..5f1dcae190e 100644 --- a/.github/workflows/build_msi.yml +++ b/.github/workflows/build_msi.yml @@ -18,6 +18,10 @@ on: permissions: contents: read +concurrency: + group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} + cancel-in-progress: true + jobs: build: name: Windows Installer diff --git a/.github/workflows/doc.yml b/.github/workflows/doc.yml index d95d089ed66..10e4cf074a5 100644 --- a/.github/workflows/doc.yml +++ b/.github/workflows/doc.yml @@ -28,6 +28,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 61e3d1adf53..9f4754f912b 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