Do not run the same workflow concurrently on non-main branches

This commit is contained in:
Kirill Bulatov 2023-12-06 22:19:48 +02:00
parent ec798e6574
commit b94c335605

View file

@ -11,6 +11,11 @@ on:
branches: branches:
- "**" - "**"
concurrency:
# Allow only one workflow per any non-`main` branch.
group: ${{ github.workflow }}-${{ github.ref_name }}-${{ github.ref_name == 'main' && github.sha || 'anysha' }}
cancel-in-progress: true
env: env:
CARGO_TERM_COLOR: always CARGO_TERM_COLOR: always
CARGO_INCREMENTAL: 0 CARGO_INCREMENTAL: 0