Concurrency management on CI (#4592)

This commit is contained in:
Emmanuel Keller 2024-08-23 11:09:44 +01:00 committed by GitHub
parent 04ae6e7a52
commit 382e88bac7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 21 additions and 0 deletions

View file

@ -6,6 +6,13 @@ on:
branches:
- main
concurrency:
# Use github.run_id on main branch
# Use github.event.pull_request.number on pull requests, so it's unique per pull request
# Use github.ref on other branches, so it's unique per branch
group: ${{ github.workflow }}-${{ github.ref == 'refs/heads/main' && github.run_id || github.event.pull_request.number || github.ref }}
cancel-in-progress: true
defaults:
run:
shell: bash

View file

@ -10,6 +10,13 @@ on:
pull_request:
merge_group:
concurrency:
# Use github.run_id on main branch
# Use github.event.pull_request.number on pull requests, so it's unique per pull request
# Use github.ref on other branches, so it's unique per branch
group: ${{ github.workflow }}-${{ github.ref == 'refs/heads/main' && github.run_id || github.event.pull_request.number || github.ref }}
cancel-in-progress: true
defaults:
run:
shell: bash

View file

@ -34,6 +34,13 @@ on:
- .github/workflows/supply-chain.yml
merge_group:
concurrency:
# Use github.run_id on main branch
# Use github.event.pull_request.number on pull requests, so it's unique per pull request
# Use github.ref on other branches, so it's unique per branch
group: ${{ github.workflow }}-${{ github.ref == 'refs/heads/main' && github.run_id || github.event.pull_request.number || github.ref }}
cancel-in-progress: true
defaults:
run:
shell: bash