about summary refs log tree commit diff
path: root/.github
diff options
context:
space:
mode:
authorWill Bush2024-04-22 13:01:42 -0500
committerWill Bush2024-04-22 13:01:42 -0500
commit75600cde6bb25b0e04d2a10d0fb9aaf975e1da81 (patch)
tree44c10ed889b27d2809eefcd7a547721e80803543 /.github
parent80368c5bef936a8229d62d8e5125e9d4f8c494a7 (diff)
workflows: add concurrency group to check-by-name workflow
On event that triggers the workflow for the matching concurrency group, any
previous runs of the workflow in the same group will be cancelled.
Diffstat (limited to '.github')
-rw-r--r--.github/workflows/check-by-name.yml7
1 files changed, 7 insertions, 0 deletions
diff --git a/.github/workflows/check-by-name.yml b/.github/workflows/check-by-name.yml
index a5070679c9d0..d063d298cc2a 100644
--- a/.github/workflows/check-by-name.yml
+++ b/.github/workflows/check-by-name.yml
@@ -16,6 +16,13 @@ on:
     # so it shouldn't be a problem
     types: [opened, synchronize, reopened, edited]
 
+# Create a check-by-name concurrency group based on the branch name. if a new
+# commit is pushed to the main branch while a previous run is still in progress,
+# the previous run will be cancelled and the new one will start.
+concurrency:
+  group: check-by-name-${{ github.ref }}
+  cancel-in-progress: true
+
 permissions:
   # We need this permission to cancel the workflow run if there's a merge conflict
   actions: write