Skip to content

Commit

Permalink
Merge pull request #346 from WalletConnect/derek/feat/concurrency
Browse files Browse the repository at this point in the history
feat: uses concurrency to cancel obsolete runs
  • Loading branch information
arein authored Jul 15, 2022
2 parents b0ae511 + a1dbe73 commit ba98238
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions .github/workflows/swift.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,15 @@ on:
pull_request:
branches: [ main, develop ]

concurrency:
# Support push/pr as event types with different behaviors each:
# 1. push: queue up builds by branch
# 2. pr: only allow one run per PR
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.event.pull_request.number || github.ref_name }}
# If there is already a workflow running for the same pull request, cancel it
# For non-PR triggers queue up builds
cancel-in-progress: ${{ github.event_name == 'pull_request' }}

jobs:
build:
runs-on: macos-latest
Expand Down

0 comments on commit ba98238

Please sign in to comment.