Skip to content

Commit 32428ab

Browse files
committed
CI: do not cancel concurrent builds on the same branch
Add an exception for try and try-perf branches to enable concurrent try builds and unrolled rollup builds.
1 parent 7fb5593 commit 32428ab

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

.github/workflows/ci.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ defaults:
3131
run:
3232
shell: bash
3333
concurrency:
34-
group: "${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}"
34+
group: "${{ ((github.ref == 'refs/heads/try' || github.ref == 'refs/heads/try-perf') && github.sha) || github.ref }}"
3535
cancel-in-progress: true
3636
jobs:
3737
pr:

src/ci/github-actions/ci.yml

+4-3
Original file line numberDiff line numberDiff line change
@@ -299,9 +299,10 @@ defaults:
299299
shell: bash
300300

301301
concurrency:
302-
# For a given workflow, if we push to the same PR, cancel all previous builds on that PR.
303-
# If the push is not attached to a PR, we will cancel all builds related to the same commit SHA.
304-
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
302+
# For a given workflow, if we push to the same branch, cancel all previous builds on that branch.
303+
# We add an exception for try builds (try branch) and unrolled rollup builds (try-perf), which
304+
# are all triggered on the same branch, but which should be able to run concurrently.
305+
group: ${{ ((github.ref == 'refs/heads/try' || github.ref == 'refs/heads/try-perf') && github.sha) || github.ref }}
305306
cancel-in-progress: true
306307

307308
jobs:

0 commit comments

Comments
 (0)