[Python-checkins] Auto-cancel old builds when new commit pushed to branch (#98009)

ezio-melotti webhook-mailer at python.org
Sat Oct 8 15:21:46 EDT 2022


https://github.com/python/cpython/commit/75751f4aa5d70f65856645a9128fd42d92d6692c
commit: 75751f4aa5d70f65856645a9128fd42d92d6692c
branch: main
author: Hugo van Kemenade <hugovk at users.noreply.github.com>
committer: ezio-melotti <ezio.melotti at gmail.com>
date: 2022-10-08T21:21:38+02:00
summary:

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 <ezio.melotti at gmail.com>

* Use the same group for all workflows.

Co-authored-by: Ezio Melotti <ezio.melotti at gmail.com>

files:
M .github/workflows/build.yml
M .github/workflows/build_msi.yml
M .github/workflows/doc.yml
M .github/workflows/verify-ensurepip-wheels.yml

diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index dc91c0dbcb02..8f5676eec08e 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 528679c0ac6b..5f1dcae190ef 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 d95d089ed667..10e4cf074a59 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 61e3d1adf534..9f4754f912b0 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



More information about the Python-checkins mailing list