Add concurrency settings to PR checks

This commit is contained in:
Michael B. Gale
2025-09-20 14:19:07 +01:00
parent 0337c4c06e
commit 6fcf631e73
56 changed files with 176 additions and 0 deletions

View File

@@ -37,6 +37,9 @@ on:
defaults: defaults:
run: run:
shell: bash shell: bash
concurrency:
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
group: ${{ github.workflow }}-${{ github.ref }}
jobs: jobs:
all-platform-bundle: all-platform-bundle:
strategy: strategy:

View File

@@ -37,6 +37,9 @@ on:
defaults: defaults:
run: run:
shell: bash shell: bash
concurrency:
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
group: ${{ github.workflow }}-${{ github.ref }}
jobs: jobs:
analyze-ref-input: analyze-ref-input:
strategy: strategy:

View File

@@ -27,6 +27,9 @@ on:
defaults: defaults:
run: run:
shell: bash shell: bash
concurrency:
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
group: ${{ github.workflow }}-${{ github.ref }}
jobs: jobs:
autobuild-action: autobuild-action:
strategy: strategy:

View File

@@ -37,6 +37,9 @@ on:
defaults: defaults:
run: run:
shell: bash shell: bash
concurrency:
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
group: ${{ github.workflow }}-${{ github.ref }}
jobs: jobs:
autobuild-direct-tracing-with-working-dir: autobuild-direct-tracing-with-working-dir:
strategy: strategy:

View File

@@ -37,6 +37,9 @@ on:
defaults: defaults:
run: run:
shell: bash shell: bash
concurrency:
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
group: ${{ github.workflow }}-${{ github.ref }}
jobs: jobs:
autobuild-direct-tracing: autobuild-direct-tracing:
strategy: strategy:

View File

@@ -27,6 +27,9 @@ on:
defaults: defaults:
run: run:
shell: bash shell: bash
concurrency:
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
group: ${{ github.workflow }}-${{ github.ref }}
jobs: jobs:
build-mode-autobuild: build-mode-autobuild:
strategy: strategy:

View File

@@ -37,6 +37,9 @@ on:
defaults: defaults:
run: run:
shell: bash shell: bash
concurrency:
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
group: ${{ github.workflow }}-${{ github.ref }}
jobs: jobs:
build-mode-manual: build-mode-manual:
strategy: strategy:

View File

@@ -27,6 +27,9 @@ on:
defaults: defaults:
run: run:
shell: bash shell: bash
concurrency:
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
group: ${{ github.workflow }}-${{ github.ref }}
jobs: jobs:
build-mode-none: build-mode-none:
strategy: strategy:

View File

@@ -27,6 +27,9 @@ on:
defaults: defaults:
run: run:
shell: bash shell: bash
concurrency:
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
group: ${{ github.workflow }}-${{ github.ref }}
jobs: jobs:
build-mode-rollback: build-mode-rollback:
strategy: strategy:

View File

@@ -27,6 +27,9 @@ on:
defaults: defaults:
run: run:
shell: bash shell: bash
concurrency:
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
group: ${{ github.workflow }}-${{ github.ref }}
jobs: jobs:
bundle-toolcache: bundle-toolcache:
strategy: strategy:

View File

@@ -27,6 +27,9 @@ on:
defaults: defaults:
run: run:
shell: bash shell: bash
concurrency:
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
group: ${{ github.workflow }}-${{ github.ref }}
jobs: jobs:
bundle-zstd: bundle-zstd:
strategy: strategy:

View File

@@ -27,6 +27,9 @@ on:
defaults: defaults:
run: run:
shell: bash shell: bash
concurrency:
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
group: ${{ github.workflow }}-${{ github.ref }}
jobs: jobs:
cleanup-db-cluster-dir: cleanup-db-cluster-dir:
strategy: strategy:

View File

@@ -27,6 +27,9 @@ on:
defaults: defaults:
run: run:
shell: bash shell: bash
concurrency:
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
group: ${{ github.workflow }}-${{ github.ref }}
jobs: jobs:
config-export: config-export:
strategy: strategy:

View File

@@ -27,6 +27,9 @@ on:
defaults: defaults:
run: run:
shell: bash shell: bash
concurrency:
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
group: ${{ github.workflow }}-${{ github.ref }}
jobs: jobs:
config-input: config-input:
strategy: strategy:

View File

@@ -27,6 +27,9 @@ on:
defaults: defaults:
run: run:
shell: bash shell: bash
concurrency:
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
group: ${{ github.workflow }}-${{ github.ref }}
jobs: jobs:
cpp-deptrace-disabled: cpp-deptrace-disabled:
strategy: strategy:

View File

@@ -27,6 +27,9 @@ on:
defaults: defaults:
run: run:
shell: bash shell: bash
concurrency:
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
group: ${{ github.workflow }}-${{ github.ref }}
jobs: jobs:
cpp-deptrace-enabled-on-macos: cpp-deptrace-enabled-on-macos:
strategy: strategy:

View File

@@ -27,6 +27,9 @@ on:
defaults: defaults:
run: run:
shell: bash shell: bash
concurrency:
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
group: ${{ github.workflow }}-${{ github.ref }}
jobs: jobs:
cpp-deptrace-enabled: cpp-deptrace-enabled:
strategy: strategy:

View File

@@ -27,6 +27,9 @@ on:
defaults: defaults:
run: run:
shell: bash shell: bash
concurrency:
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
group: ${{ github.workflow }}-${{ github.ref }}
jobs: jobs:
diagnostics-export: diagnostics-export:
strategy: strategy:

View File

@@ -37,6 +37,9 @@ on:
defaults: defaults:
run: run:
shell: bash shell: bash
concurrency:
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
group: ${{ github.workflow }}-${{ github.ref }}
jobs: jobs:
export-file-baseline-information: export-file-baseline-information:
strategy: strategy:

View File

@@ -27,6 +27,9 @@ on:
defaults: defaults:
run: run:
shell: bash shell: bash
concurrency:
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
group: ${{ github.workflow }}-${{ github.ref }}
jobs: jobs:
extractor-ram-threads: extractor-ram-threads:
strategy: strategy:

View File

@@ -37,6 +37,9 @@ on:
defaults: defaults:
run: run:
shell: bash shell: bash
concurrency:
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
group: ${{ github.workflow }}-${{ github.ref }}
jobs: jobs:
go-custom-queries: go-custom-queries:
strategy: strategy:

View File

@@ -37,6 +37,9 @@ on:
defaults: defaults:
run: run:
shell: bash shell: bash
concurrency:
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
group: ${{ github.workflow }}-${{ github.ref }}
jobs: jobs:
go-indirect-tracing-workaround-diagnostic: go-indirect-tracing-workaround-diagnostic:
strategy: strategy:

View File

@@ -37,6 +37,9 @@ on:
defaults: defaults:
run: run:
shell: bash shell: bash
concurrency:
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
group: ${{ github.workflow }}-${{ github.ref }}
jobs: jobs:
go-indirect-tracing-workaround-no-file-program: go-indirect-tracing-workaround-no-file-program:
strategy: strategy:

View File

@@ -37,6 +37,9 @@ on:
defaults: defaults:
run: run:
shell: bash shell: bash
concurrency:
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
group: ${{ github.workflow }}-${{ github.ref }}
jobs: jobs:
go-indirect-tracing-workaround: go-indirect-tracing-workaround:
strategy: strategy:

View File

@@ -37,6 +37,9 @@ on:
defaults: defaults:
run: run:
shell: bash shell: bash
concurrency:
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
group: ${{ github.workflow }}-${{ github.ref }}
jobs: jobs:
go-tracing-autobuilder: go-tracing-autobuilder:
strategy: strategy:

View File

@@ -37,6 +37,9 @@ on:
defaults: defaults:
run: run:
shell: bash shell: bash
concurrency:
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
group: ${{ github.workflow }}-${{ github.ref }}
jobs: jobs:
go-tracing-custom-build-steps: go-tracing-custom-build-steps:
strategy: strategy:

View File

@@ -37,6 +37,9 @@ on:
defaults: defaults:
run: run:
shell: bash shell: bash
concurrency:
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
group: ${{ github.workflow }}-${{ github.ref }}
jobs: jobs:
go-tracing-legacy-workflow: go-tracing-legacy-workflow:
strategy: strategy:

View File

@@ -27,6 +27,9 @@ on:
defaults: defaults:
run: run:
shell: bash shell: bash
concurrency:
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
group: ${{ github.workflow }}-${{ github.ref }}
jobs: jobs:
init-with-registries: init-with-registries:
strategy: strategy:

View File

@@ -27,6 +27,9 @@ on:
defaults: defaults:
run: run:
shell: bash shell: bash
concurrency:
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
group: ${{ github.workflow }}-${{ github.ref }}
jobs: jobs:
javascript-source-root: javascript-source-root:
strategy: strategy:

View File

@@ -27,6 +27,9 @@ on:
defaults: defaults:
run: run:
shell: bash shell: bash
concurrency:
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
group: ${{ github.workflow }}-${{ github.ref }}
jobs: jobs:
job-run-uuid-sarif: job-run-uuid-sarif:
strategy: strategy:

View File

@@ -27,6 +27,9 @@ on:
defaults: defaults:
run: run:
shell: bash shell: bash
concurrency:
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
group: ${{ github.workflow }}-${{ github.ref }}
jobs: jobs:
language-aliases: language-aliases:
strategy: strategy:

View File

@@ -37,6 +37,9 @@ on:
defaults: defaults:
run: run:
shell: bash shell: bash
concurrency:
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
group: ${{ github.workflow }}-${{ github.ref }}
jobs: jobs:
multi-language-autodetect: multi-language-autodetect:
strategy: strategy:

View File

@@ -27,6 +27,9 @@ on:
defaults: defaults:
run: run:
shell: bash shell: bash
concurrency:
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
group: ${{ github.workflow }}-${{ github.ref }}
jobs: jobs:
overlay-init-fallback: overlay-init-fallback:
strategy: strategy:

View File

@@ -37,6 +37,9 @@ on:
defaults: defaults:
run: run:
shell: bash shell: bash
concurrency:
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
group: ${{ github.workflow }}-${{ github.ref }}
jobs: jobs:
packaging-codescanning-config-inputs-js: packaging-codescanning-config-inputs-js:
strategy: strategy:

View File

@@ -37,6 +37,9 @@ on:
defaults: defaults:
run: run:
shell: bash shell: bash
concurrency:
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
group: ${{ github.workflow }}-${{ github.ref }}
jobs: jobs:
packaging-config-inputs-js: packaging-config-inputs-js:
strategy: strategy:

View File

@@ -37,6 +37,9 @@ on:
defaults: defaults:
run: run:
shell: bash shell: bash
concurrency:
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
group: ${{ github.workflow }}-${{ github.ref }}
jobs: jobs:
packaging-config-js: packaging-config-js:
strategy: strategy:

View File

@@ -37,6 +37,9 @@ on:
defaults: defaults:
run: run:
shell: bash shell: bash
concurrency:
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
group: ${{ github.workflow }}-${{ github.ref }}
jobs: jobs:
packaging-inputs-js: packaging-inputs-js:
strategy: strategy:

View File

@@ -27,6 +27,9 @@ on:
defaults: defaults:
run: run:
shell: bash shell: bash
concurrency:
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
group: ${{ github.workflow }}-${{ github.ref }}
jobs: jobs:
quality-queries: quality-queries:
strategy: strategy:

View File

@@ -37,6 +37,9 @@ on:
defaults: defaults:
run: run:
shell: bash shell: bash
concurrency:
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
group: ${{ github.workflow }}-${{ github.ref }}
jobs: jobs:
remote-config: remote-config:
strategy: strategy:

View File

@@ -27,6 +27,9 @@ on:
defaults: defaults:
run: run:
shell: bash shell: bash
concurrency:
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
group: ${{ github.workflow }}-${{ github.ref }}
jobs: jobs:
resolve-environment-action: resolve-environment-action:
strategy: strategy:

View File

@@ -27,6 +27,9 @@ on:
defaults: defaults:
run: run:
shell: bash shell: bash
concurrency:
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
group: ${{ github.workflow }}-${{ github.ref }}
jobs: jobs:
rubocop-multi-language: rubocop-multi-language:
strategy: strategy:

3
.github/workflows/__ruby.yml generated vendored
View File

@@ -27,6 +27,9 @@ on:
defaults: defaults:
run: run:
shell: bash shell: bash
concurrency:
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
group: ${{ github.workflow }}-${{ github.ref }}
jobs: jobs:
ruby: ruby:
strategy: strategy:

3
.github/workflows/__rust.yml generated vendored
View File

@@ -27,6 +27,9 @@ on:
defaults: defaults:
run: run:
shell: bash shell: bash
concurrency:
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
group: ${{ github.workflow }}-${{ github.ref }}
jobs: jobs:
rust: rust:
strategy: strategy:

View File

@@ -37,6 +37,9 @@ on:
defaults: defaults:
run: run:
shell: bash shell: bash
concurrency:
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
group: ${{ github.workflow }}-${{ github.ref }}
jobs: jobs:
split-workflow: split-workflow:
strategy: strategy:

View File

@@ -27,6 +27,9 @@ on:
defaults: defaults:
run: run:
shell: bash shell: bash
concurrency:
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
group: ${{ github.workflow }}-${{ github.ref }}
jobs: jobs:
start-proxy: start-proxy:
strategy: strategy:

View File

@@ -27,6 +27,9 @@ on:
defaults: defaults:
run: run:
shell: bash shell: bash
concurrency:
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
group: ${{ github.workflow }}-${{ github.ref }}
jobs: jobs:
submit-sarif-failure: submit-sarif-failure:
strategy: strategy:

View File

@@ -27,6 +27,9 @@ on:
defaults: defaults:
run: run:
shell: bash shell: bash
concurrency:
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
group: ${{ github.workflow }}-${{ github.ref }}
jobs: jobs:
swift-autobuild: swift-autobuild:
strategy: strategy:

View File

@@ -37,6 +37,9 @@ on:
defaults: defaults:
run: run:
shell: bash shell: bash
concurrency:
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
group: ${{ github.workflow }}-${{ github.ref }}
jobs: jobs:
swift-custom-build: swift-custom-build:
strategy: strategy:

View File

@@ -27,6 +27,9 @@ on:
defaults: defaults:
run: run:
shell: bash shell: bash
concurrency:
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
group: ${{ github.workflow }}-${{ github.ref }}
jobs: jobs:
test-autobuild-working-dir: test-autobuild-working-dir:
strategy: strategy:

View File

@@ -37,6 +37,9 @@ on:
defaults: defaults:
run: run:
shell: bash shell: bash
concurrency:
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
group: ${{ github.workflow }}-${{ github.ref }}
jobs: jobs:
test-local-codeql: test-local-codeql:
strategy: strategy:

3
.github/workflows/__test-proxy.yml generated vendored
View File

@@ -27,6 +27,9 @@ on:
defaults: defaults:
run: run:
shell: bash shell: bash
concurrency:
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
group: ${{ github.workflow }}-${{ github.ref }}
jobs: jobs:
test-proxy: test-proxy:
strategy: strategy:

View File

@@ -37,6 +37,9 @@ on:
defaults: defaults:
run: run:
shell: bash shell: bash
concurrency:
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
group: ${{ github.workflow }}-${{ github.ref }}
jobs: jobs:
unset-environment: unset-environment:
strategy: strategy:

View File

@@ -37,6 +37,9 @@ on:
defaults: defaults:
run: run:
shell: bash shell: bash
concurrency:
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
group: ${{ github.workflow }}-${{ github.ref }}
jobs: jobs:
upload-quality-sarif: upload-quality-sarif:
strategy: strategy:

View File

@@ -37,6 +37,9 @@ on:
defaults: defaults:
run: run:
shell: bash shell: bash
concurrency:
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
group: ${{ github.workflow }}-${{ github.ref }}
jobs: jobs:
upload-ref-sha-input: upload-ref-sha-input:
strategy: strategy:

View File

@@ -37,6 +37,9 @@ on:
defaults: defaults:
run: run:
shell: bash shell: bash
concurrency:
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
group: ${{ github.workflow }}-${{ github.ref }}
jobs: jobs:
with-checkout-path: with-checkout-path:
strategy: strategy:

View File

@@ -269,6 +269,17 @@ for file in sorted((this_dir / 'checks').glob('*.yml')):
'shell': 'bash', 'shell': 'bash',
}, },
}, },
'concurrency': {
# Cancel in-progress workflows in the same 'group' for pull_request events,
# but other event types. This should have the effect that workflows on PRs
# get cancelled if there is a newer workflow in the same concurrency group.
# For other events, the new workflows should wait until earlier ones have finished.
# This should help reduce the number of concurrent workflows on the repo, and
# consequently the number of concurrent API requests.
'cancel-in-progress': "${{ github.event_name == 'pull_request' }}",
# The group is determined by the workflow name + the ref
'group': "${{ github.workflow }}-${{ github.ref }}"
},
'jobs': { 'jobs': {
checkName: checkJob checkName: checkJob
} }