Skip to content

Commit

Permalink
Cancel workflows when PR or ref is updated
Browse files Browse the repository at this point in the history
  • Loading branch information
jlvandenhout authored Sep 25, 2023
1 parent c9a9736 commit 8df4131
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/preview.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ on:
issue_comment:
types: [created]

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
preview:
if: |
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ on:
pull_request:
branches:
- main

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
publish:
strategy:
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ on:
pull_request:
branches:
- main

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
consistency:
runs-on: ubuntu-latest
Expand Down

0 comments on commit 8df4131

Please sign in to comment.