Skip to content

Commit

Permalink
GHA: cancel runs on PR, but not on push
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
Al2Klimov committed Nov 17, 2023
1 parent 76b460c commit 0fe1305
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/rpm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 0fe1305

Please sign in to comment.