workflows/backport: cancel concurrent runs

When backporting a change to 24.11 and 25.05 at the same time by adding
the two labels immediately *after* merging the PR, three backport jobs
will run concurrently: One for the merge and one for each label added.
Each of those jobs will try to create both PRs, which will lead to two
of the jobs failing for sure.

With a concurrency group and cancelling in-progress jobs, only one of
those jobs will remain. This reduces notification noise.

(cherry picked from commit 6276e09530)
This commit is contained in:
Wolfgang Walther 2025-06-07 19:36:24 +02:00 committed by github-actions[bot]
parent 1c2f88644f
commit c20a6accc7

View file

@ -9,6 +9,10 @@ on:
pull_request_target:
types: [closed, labeled]
concurrency:
group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
permissions:
contents: read
issues: write