Skip to content

Commit ccbd239

Browse files
CI: Cancel in-progress jobs for the same branch
1 parent 68a2ede commit ccbd239

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

.github/workflows/format.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ on:
55
jobs:
66
format:
77
runs-on: ubuntu-latest
8+
concurrency:
9+
group: ${{ github.workflow }}-${{ github.ref }}
10+
cancel-in-progress: true
811
container:
912
image: swift:6.0.1-jammy
1013
steps:

.github/workflows/main.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ on:
55
push:
66
branches: [main]
77

8+
concurrency:
9+
group: ${{ github.workflow }}-${{ github.ref }}
10+
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
11+
812
jobs:
913
build-macos:
1014
strategy:

0 commit comments

Comments
 (0)