diff --git a/.github/workflows/book.yml b/.github/workflows/book.yml index b99d7a939..732ff8b66 100644 --- a/.github/workflows/book.yml +++ b/.github/workflows/book.yml @@ -35,6 +35,8 @@ permissions: # Scope this to the ref, and keep the single-deploy guarantee on the deploy job # itself. Superseded PR runs are cancelled; pushes to main are not, so a # publish in flight is never interrupted. +# The group deliberately has no commit SHA. Parallel builds on main would let +# a slower older commit deploy after a newer one and replace the published site. concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: ${{ github.event_name == 'pull_request' }} diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a7862db9e..bd0c76495 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -28,9 +28,10 @@ on: - 'Cargo.lock' - '.github/workflows/**' -# main runs finish; any other ref cancels the older run of this workflow. +# Each commit on main gets its own group, so it starts at once. Any other ref +# still shares one group and cancels the older run. concurrency: - group: ci-gate-${{ github.ref_name }} + group: ci-gate-${{ github.ref_name }}${{ github.ref_name == 'main' && format('-{0}', github.sha) || '' }} cancel-in-progress: ${{ github.ref_name != 'main' }} # Every other workflow in the repo pins this rather than inheriting whatever the diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index afdf30182..60aaba1f3 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -26,9 +26,10 @@ on: schedule: - cron: "44 3 * * 6" -# main runs finish; any other ref cancels the older run of this workflow. +# Each commit on main gets its own group, so it starts at once. Any other ref +# still shares one group and cancels the older run. concurrency: - group: ${{ github.workflow }}-${{ github.ref_name }} + group: ${{ github.workflow }}-${{ github.ref_name }}${{ github.ref_name == 'main' && format('-{0}', github.sha) || '' }} cancel-in-progress: ${{ github.ref_name != 'main' }} jobs: diff --git a/.github/workflows/cutile-rs.yml b/.github/workflows/cutile-rs.yml index a853ad584..665ed1429 100644 --- a/.github/workflows/cutile-rs.yml +++ b/.github/workflows/cutile-rs.yml @@ -25,9 +25,10 @@ on: - "pull-request/[0-9]+" workflow_dispatch: -# main runs finish; any other ref cancels the older run of this workflow. +# Each commit on main gets its own group, so it starts at once. Any other ref +# still shares one group and cancels the older run. concurrency: - group: ${{ github.workflow }}-${{ github.ref_name }} + group: ${{ github.workflow }}-${{ github.ref_name }}${{ github.ref_name == 'main' && format('-{0}', github.sha) || '' }} cancel-in-progress: ${{ github.ref_name != 'main' }} permissions: diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 98d6da40a..c924c78d7 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -26,9 +26,10 @@ on: - 'Cargo.lock' - '.github/workflows/**' -# main runs finish; any other ref cancels the older run of this workflow. +# Each commit on main gets its own group, so it starts at once. Any other ref +# still shares one group and cancels the older run. concurrency: - group: ${{ github.workflow }}-${{ github.ref_name }} + group: ${{ github.workflow }}-${{ github.ref_name }}${{ github.ref_name == 'main' && format('-{0}', github.sha) || '' }} cancel-in-progress: ${{ github.ref_name != 'main' }} permissions: diff --git a/.github/workflows/examples-compile.yml b/.github/workflows/examples-compile.yml index 9efa9bd73..0f8544cb6 100644 --- a/.github/workflows/examples-compile.yml +++ b/.github/workflows/examples-compile.yml @@ -26,9 +26,10 @@ on: - 'Cargo.lock' - '.github/workflows/**' -# main runs finish; any other ref cancels the older run of this workflow. +# Each commit on main gets its own group, so it starts at once. Any other ref +# still shares one group and cancels the older run. concurrency: - group: ${{ github.workflow }}-${{ github.ref_name }} + group: ${{ github.workflow }}-${{ github.ref_name }}${{ github.ref_name == 'main' && format('-{0}', github.sha) || '' }} cancel-in-progress: ${{ github.ref_name != 'main' }} permissions: diff --git a/.github/workflows/naming-guard.yml b/.github/workflows/naming-guard.yml index 4f2e9dc4c..00eb30f37 100644 --- a/.github/workflows/naming-guard.yml +++ b/.github/workflows/naming-guard.yml @@ -22,9 +22,10 @@ on: - 'cuda-oxide/scripts/check-reserved-prefixes.sh' - '.github/workflows/naming-guard.yml' -# main runs finish; any other ref cancels the older run of this workflow. +# Each commit on main gets its own group, so it starts at once. Any other ref +# still shares one group and cancels the older run. concurrency: - group: ${{ github.workflow }}-${{ github.ref_name }} + group: ${{ github.workflow }}-${{ github.ref_name }}${{ github.ref_name == 'main' && format('-{0}', github.sha) || '' }} cancel-in-progress: ${{ github.ref_name != 'main' }} permissions: diff --git a/.github/workflows/status-guard.yml b/.github/workflows/status-guard.yml index 5704006c2..6c7ea3659 100644 --- a/.github/workflows/status-guard.yml +++ b/.github/workflows/status-guard.yml @@ -7,9 +7,10 @@ on: pull_request: branches: [main] -# main runs finish; any other ref cancels the older run of this workflow. +# Each commit on main gets its own group, so it starts at once. Any other ref +# still shares one group and cancels the older run. concurrency: - group: ${{ github.workflow }}-${{ github.ref_name }} + group: ${{ github.workflow }}-${{ github.ref_name }}${{ github.ref_name == 'main' && format('-{0}', github.sha) || '' }} cancel-in-progress: ${{ github.ref_name != 'main' }} permissions: