about summary refs log tree commit diff
path: root/src/ci/github-actions
diff options
context:
space:
mode:
authorJakub Beránek <berykubik@gmail.com>2023-06-29 14:52:52 +0200
committerJakub Beránek <berykubik@gmail.com>2023-06-29 14:52:52 +0200
commit32428ab5f37b56314715b23b14dd700510d84f1e (patch)
treeac7768189048314c8d9aa2f04092a9185e1ea650 /src/ci/github-actions
parent7fb559353ee86c90a7179b1791cb29a81a24a4d2 (diff)
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.
Diffstat (limited to 'src/ci/github-actions')
-rw-r--r--src/ci/github-actions/ci.yml7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/ci/github-actions/ci.yml b/src/ci/github-actions/ci.yml
index e5487b3e746..cb12042c117 100644
--- a/src/ci/github-actions/ci.yml
+++ b/src/ci/github-actions/ci.yml
@@ -299,9 +299,10 @@ defaults:
     shell: bash
 
 concurrency:
-  # For a given workflow, if we push to the same PR, cancel all previous builds on that PR.
-  # If the push is not attached to a PR, we will cancel all builds related to the same commit SHA.
-  group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
+  # For a given workflow, if we push to the same branch, cancel all previous builds on that branch.
+  # We add an exception for try builds (try branch) and unrolled rollup builds (try-perf), which
+  # are all triggered on the same branch, but which should be able to run concurrently.
+  group: ${{ ((github.ref == 'refs/heads/try' || github.ref == 'refs/heads/try-perf') && github.sha) || github.ref }}
   cancel-in-progress: true
 
 jobs: