From 75600cde6bb25b0e04d2a10d0fb9aaf975e1da81 Mon Sep 17 00:00:00 2001 From: Will Bush Date: Mon, 22 Apr 2024 13:01:42 -0500 Subject: [PATCH] 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. --- .github/workflows/check-by-name.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/check-by-name.yml b/.github/workflows/check-by-name.yml index a5070679c9d07..d063d298cc2a6 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