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@gmail.com>

* Use the same group for all workflows.

Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com>
This commit is contained in:
Hugo van Kemenade 2022-10-08 21:21:38 +02:00 committed by GitHub
parent 5405537813
commit 75751f4aa5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 16 additions and 0 deletions

View File

@ -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'

View File

@ -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

View File

@ -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'

View File

@ -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