diff --git a/.github/workflows/swift.yml b/.github/workflows/swift.yml index 433ae80b7..c0d8d4d36 100644 --- a/.github/workflows/swift.yml +++ b/.github/workflows/swift.yml @@ -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