Skip to content

Commit

Permalink
ci: pr action cancel previous runs
Browse files Browse the repository at this point in the history
  • Loading branch information
alexfreska committed May 3, 2024
1 parent 2d9ae57 commit 5ec5150
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,16 @@ name: PR

on:
pull_request:
types: [opened, synchronize, reopened, closed]

# Cancel previous runs when the PR is updated.
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
mac:
if: ${{ github.event_name == 'pull_request' && github.event.action != 'closed' }}
strategy:
matrix:
app: [hostd, renterd]
Expand Down Expand Up @@ -57,6 +64,7 @@ jobs:
run: yarn workspace ${{ matrix.app }} make --arch=arm64,x64
shell: bash
linux:
if: ${{ github.event_name == 'pull_request' && github.event.action != 'closed' }}
strategy:
matrix:
app: [hostd, renterd]
Expand All @@ -74,6 +82,7 @@ jobs:
run: yarn workspace ${{ matrix.app }} make --arch=arm64,x64
shell: bash
windows:
if: ${{ github.event_name == 'pull_request' && github.event.action != 'closed' }}
strategy:
matrix:
app: [hostd, renterd]
Expand Down

0 comments on commit 5ec5150

Please sign in to comment.