Skip to content

Commit

Permalink
ci: only cancel in-progress jobs that are triggered by pull requests
Browse files Browse the repository at this point in the history
  • Loading branch information
G-Rath committed Apr 7, 2024
1 parent 5412b72 commit 47e675d
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/native-wsl.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on: [push, pull_request]
concurrency:
# Pushing new changes to a branch will cancel any in-progress CI runs of this workflow
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ !contains(github.ref, 'release-') && github.ref != 'refs/heads/main' }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}

jobs:
build:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/node-4+.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on: [pull_request, push]
concurrency:
# Pushing new changes to a branch will cancel any in-progress CI runs of this workflow
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ !contains(github.ref, 'release-') && github.ref != 'refs/heads/main' }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}

permissions:
contents: read
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on: [pull_request, push]
concurrency:
# Pushing new changes to a branch will cancel any in-progress CI runs of this workflow
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ !contains(github.ref, 'release-') && github.ref != 'refs/heads/main' }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}

permissions:
contents: read
Expand Down

0 comments on commit 47e675d

Please sign in to comment.