From aec9cbf3cbf2cff89095ad54a14450ede1b2841c Mon Sep 17 00:00:00 2001 From: Charlie Marsh Date: Sun, 21 Jul 2024 21:08:20 -0400 Subject: [PATCH] Cancel in-flight builds on PR update (#282) --- .github/workflows/apple.yml | 5 +++++ .github/workflows/check.yml | 5 ++++- .github/workflows/linux.yml | 5 +++++ .github/workflows/windows.yml | 5 +++++ 4 files changed, 19 insertions(+), 1 deletion(-) diff --git a/.github/workflows/apple.yml b/.github/workflows/apple.yml index 37f2b365..a04d9f74 100644 --- a/.github/workflows/apple.yml +++ b/.github/workflows/apple.yml @@ -6,6 +6,11 @@ on: pull_request: schedule: - cron: '13 11 * * *' + +concurrency: + group: ${{ github.workflow }}-${{ github.ref_name }}-${{ github.event.pull_request.number || github.sha }} + cancel-in-progress: true + jobs: pythonbuild: runs-on: 'macos-13' diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index f0bc359b..b16aa9b9 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -1,10 +1,13 @@ - name: Check on: push: pull_request: +concurrency: + group: ${{ github.workflow }}-${{ github.ref_name }}-${{ github.event.pull_request.number || github.sha }} + cancel-in-progress: true + jobs: check: runs-on: "ubuntu-latest" diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 41a6f36e..3962fa3e 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -6,6 +6,11 @@ on: pull_request: schedule: - cron: '13 11 * * *' + +concurrency: + group: ${{ github.workflow }}-${{ github.ref_name }}-${{ github.event.pull_request.number || github.sha }} + cancel-in-progress: true + jobs: pythonbuild: runs-on: ubuntu-22.04 diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index 38679183..7e317a13 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -6,6 +6,11 @@ on: pull_request: schedule: - cron: '13 11 * * *' + +concurrency: + group: ${{ github.workflow }}-${{ github.ref_name }}-${{ github.event.pull_request.number || github.sha }} + cancel-in-progress: true + jobs: pythonbuild: runs-on: 'windows-2019'