GHA: cancel runs on PR, but not on push

In a PR one top commit replaces the previous one.
But the central branches are more like timelines.
It's nice to have red crosses in a such timeline
as clear indicators that something was actually broken.
This commit is contained in:
Alexander A. Klimov 2023-11-17 15:54:03 +01:00
parent 76b460c8ba
commit 0fe13051b7
4 changed files with 4 additions and 4 deletions

View File

@ -11,7 +11,7 @@ on:
- published
concurrency:
group: docker-${{ github.ref }}
group: docker-${{ github.event_name == 'push' && github.sha || github.ref }}
cancel-in-progress: true
jobs:

View File

@ -8,7 +8,7 @@ on:
pull_request: {}
concurrency:
group: linux-${{ github.ref }}
group: linux-${{ github.event_name == 'push' && github.sha || github.ref }}
cancel-in-progress: true
jobs:

View File

@ -8,7 +8,7 @@ on:
pull_request: {}
concurrency:
group: rpm-${{ github.ref }}
group: rpm-${{ github.event_name == 'push' && github.sha || github.ref }}
cancel-in-progress: true
jobs:

View File

@ -8,7 +8,7 @@ on:
pull_request: {}
concurrency:
group: windows-${{ github.ref }}
group: windows-${{ github.event_name == 'push' && github.sha || github.ref }}
cancel-in-progress: true
jobs: