mirror of
https://github.com/python/cpython.git
synced 2025-09-15 05:06:12 +00:00
[3.14] gh-134309: Add `github.actor
` to the GitHub Actions concurrency key (GH-134310) (#134484)
gh-134309: Add ``github.actor`` to the GitHub Actions concurrency key (GH-134310)
When inexperienced users create a PR from their default branch, all of the concurrency keys
collide as there is no namespacing. This becomes an issue at events with many new contributors,
where workflow runs are cancelled on other pull requests.
Disambiguate by adding the username of the relevant 'actor' to the concurrency key.
(cherry picked from commit 979d81a179
)
Authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Co-authored-by: Kira <coldcaption@gmail.com>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Co-authored-by: Sviatoslav Sydorenko <sviat@redhat.com>
Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
This commit is contained in:
parent
4e9248f685
commit
03a211290e
1 changed files with 7 additions and 1 deletions
8
.github/workflows/build.yml
vendored
8
.github/workflows/build.yml
vendored
|
@ -15,7 +15,13 @@ permissions:
|
||||||
contents: read
|
contents: read
|
||||||
|
|
||||||
concurrency:
|
concurrency:
|
||||||
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}-reusable
|
# https://docs.github.com/en/actions/writing-workflows/workflow-syntax-for-github-actions#concurrency
|
||||||
|
# 'group' must be a key uniquely representing a PR or push event.
|
||||||
|
# github.workflow is the workflow name
|
||||||
|
# github.actor is the user invoking the workflow
|
||||||
|
# github.head_ref is the source branch of the PR or otherwise blank
|
||||||
|
# github.run_id is a unique number for the current run
|
||||||
|
group: ${{ github.workflow }}-${{ github.actor }}-${{ github.head_ref || github.run_id }}
|
||||||
cancel-in-progress: true
|
cancel-in-progress: true
|
||||||
|
|
||||||
env:
|
env:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue