Cancel in progress builds of PRs when a new one starts

Add a snippet based on the example in

https://docs.github.com/en/actions/using-jobs/using-concurrency#example-only-cancel-in-progress-jobs-or-runs-for-the-current-workflow

to all CI workflows to cancel the currently running build when a new one
starts. This should ensure that we don't keep building the old version
of the PR after a new one has been pushed.
This commit is contained in:
Vadim Zeitlin 2023-02-21 14:58:57 +01:00
parent 95f16e63d2
commit 8505c48a34
6 changed files with 24 additions and 0 deletions

View file

@ -56,6 +56,10 @@ on:
required: false
default: false
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
permissions:
contents: read

View file

@ -45,6 +45,10 @@ on:
- '*.yml'
- 'wxwidgets.props'
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
permissions:
contents: read

View file

@ -59,6 +59,10 @@ on:
- 'CMakeLists.txt'
- 'wxwidgets.props'
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
permissions:
contents: read

View file

@ -59,6 +59,10 @@ on:
- 'CMakeLists.txt'
- 'wxwidgets.props'
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
permissions:
contents: read

View file

@ -49,6 +49,10 @@ on:
- '*.yml'
- 'CMakeLists.txt'
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
permissions:
contents: read

View file

@ -53,6 +53,10 @@ on:
- 'wxwidgets.props'
- 'CMakeLists.txt'
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
permissions:
contents: read