workflows: cancel running jobs on pull request updates (#412608)

This commit is contained in:
Jörg Thalheim 2025-06-01 14:35:04 +02:00 committed by GitHub
commit 3a62ab17db
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
14 changed files with 63 additions and 0 deletions

View file

@ -10,6 +10,10 @@ on:
- 'staging-**'
- '!staging-next'
concurrency:
group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
permissions:
pull-requests: write

View file

@ -6,6 +6,10 @@ on:
- .github/workflows/check-format.yml
pull_request_target:
concurrency:
group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
permissions: {}
jobs:

View file

@ -9,6 +9,10 @@ on:
- 'shell.nix'
- 'ci/**'
concurrency:
group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
permissions: {}
jobs:

View file

@ -29,6 +29,10 @@ on:
pull_request_target:
types: [opened, ready_for_review, synchronize, reopened]
concurrency:
group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
permissions: {}
env:

View file

@ -16,6 +16,10 @@ on:
pull_request_target:
types: [edited]
concurrency:
group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
permissions: {}
jobs:

View file

@ -6,6 +6,10 @@ on:
- .github/workflows/eval-aliases.yml
pull_request_target:
concurrency:
group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
permissions: {}
jobs:

View file

@ -16,6 +16,10 @@ on:
- haskell-updates
- python-updates
concurrency:
group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
permissions: {}
jobs:
@ -290,3 +294,5 @@ jobs:
if: needs.prepare.outputs.targetSha
uses: ./.github/workflows/reviewers.yml
secrets: inherit
with:
caller: ${{ github.workflow }}

View file

@ -8,6 +8,10 @@ name: "Label PR"
on:
pull_request_target:
concurrency:
group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
permissions:
contents: read
issues: write # needed to create *new* labels

View file

@ -9,6 +9,10 @@ on:
- 'lib/**'
- 'maintainers/**'
concurrency:
group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
permissions: {}
jobs:

View file

@ -18,6 +18,10 @@ on:
# Since the lib functions are used to 'massage' the options before producing the manual
- "lib/**"
concurrency:
group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
permissions: {}
jobs:

View file

@ -10,6 +10,10 @@ on:
- 'lib/**'
- 'pkgs/by-name/ni/nixdoc/**'
concurrency:
group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
permissions: {}
jobs:

View file

@ -6,6 +6,10 @@ on:
- .github/workflows/nix-parse-v2.yml
pull_request_target:
concurrency:
group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
permissions: {}
jobs:

View file

@ -11,6 +11,10 @@ on:
- .github/workflows/nixpkgs-vet.yml
pull_request_target:
concurrency:
group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
permissions: {}
# We don't use a concurrency group here, because the action is triggered quite often (due to the PR edit trigger), and contributors would get notified on any canceled run.

View file

@ -10,6 +10,15 @@ on:
pull_request_target:
types: [ready_for_review]
workflow_call:
inputs:
caller:
description: Name of the calling workflow.
required: true
type: string
concurrency:
group: ${{ inputs.caller }}-${{ github.workflow }}-${{ github.event_name }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
permissions: {}