Skip to content

Commit 2f73ddb

Browse files
committed
CI: limit concurrent job on PRs
1 parent 57ea564 commit 2f73ddb

1 file changed

Lines changed: 7 additions & 3 deletions

File tree

.github/workflows/CI.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,13 @@ on:
88
# Every weekday at 01:30 AM UTC
99
- cron: '30 1 * * 1-5'
1010

11-
#concurrency:
12-
# group: ${{ github.workflow }}-${{ github.ref }}
13-
# cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }}
11+
# the `concurrency` settings ensure that not too many CI jobs run in parallel
12+
concurrency:
13+
# group by workflow and ref; the last slightly strange component ensures that for pull
14+
# requests, we limit to 1 concurrent job, but for the master branch we don't
15+
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.ref != 'refs/heads/master' || github.run_number }}
16+
# Cancel intermediate builds, but only if it is a pull request build.
17+
cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }}
1418

1519
jobs:
1620
test:

0 commit comments

Comments
 (0)