From bbefafc36b5ab55802e070a0a546d1f420d6481e Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade Date: Thu, 6 Oct 2022 17:52:18 -0700 Subject: [PATCH 1/3] Auto-cancel old builds when new commit pushed to branch --- .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 1db5c505149397..26f14bb20c4cca 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -25,6 +25,10 @@ on: permissions: contents: read +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + 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 528679c0ac6b37..ba71dee99d5743 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.ref }} + cancel-in-progress: true + jobs: build: name: Windows Installer diff --git a/.github/workflows/doc.yml b/.github/workflows/doc.yml index d95d089ed66755..a85b90018d6273 100644 --- a/.github/workflows/doc.yml +++ b/.github/workflows/doc.yml @@ -28,6 +28,10 @@ on: permissions: contents: read +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + 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..461fdb00c59952 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.ref }} + cancel-in-progress: true + jobs: verify: runs-on: ubuntu-latest From ee74a8574a0ee81d79298eb09e10024a41340819 Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade Date: Fri, 7 Oct 2022 19:57:18 +0300 Subject: [PATCH 2/3] Add a fallback Co-authored-by: Ezio Melotti --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 26f14bb20c4cca..993b6586b95b29 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -26,7 +26,7 @@ permissions: contents: read concurrency: - group: ${{ github.workflow }}-${{ github.ref }} + group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} cancel-in-progress: true jobs: From 19007ae0d7e856d24ca9f606faa702b4f7969ee7 Mon Sep 17 00:00:00 2001 From: Ezio Melotti Date: Sat, 8 Oct 2022 10:21:36 +0200 Subject: [PATCH 3/3] Use the same group for all workflows. --- .github/workflows/build_msi.yml | 2 +- .github/workflows/doc.yml | 2 +- .github/workflows/verify-ensurepip-wheels.yml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build_msi.yml b/.github/workflows/build_msi.yml index ba71dee99d5743..5f1dcae190efbc 100644 --- a/.github/workflows/build_msi.yml +++ b/.github/workflows/build_msi.yml @@ -19,7 +19,7 @@ permissions: contents: read concurrency: - group: ${{ github.workflow }}-${{ github.ref }} + group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} cancel-in-progress: true jobs: diff --git a/.github/workflows/doc.yml b/.github/workflows/doc.yml index a85b90018d6273..10e4cf074a590a 100644 --- a/.github/workflows/doc.yml +++ b/.github/workflows/doc.yml @@ -29,7 +29,7 @@ permissions: contents: read concurrency: - group: ${{ github.workflow }}-${{ github.ref }} + group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} cancel-in-progress: true jobs: diff --git a/.github/workflows/verify-ensurepip-wheels.yml b/.github/workflows/verify-ensurepip-wheels.yml index 461fdb00c59952..9f4754f912b09f 100644 --- a/.github/workflows/verify-ensurepip-wheels.yml +++ b/.github/workflows/verify-ensurepip-wheels.yml @@ -17,7 +17,7 @@ permissions: contents: read concurrency: - group: ${{ github.workflow }}-${{ github.ref }} + group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} cancel-in-progress: true jobs: