diff --git a/templates/BHE/ci-alpha.yml b/templates/BHE/ci-alpha.yml index 67d046d..5fa0060 100644 --- a/templates/BHE/ci-alpha.yml +++ b/templates/BHE/ci-alpha.yml @@ -2,7 +2,10 @@ # omitted (private repos do not enforce OSS copyright); all other jobs mirror # the BHoM variant. Copy to .github/workflows/ci-alpha.yml in each BHE alpha # repo. Runs on pull_request, non-blocking until a ruleset requires its checks. -# Workflow name CI keeps check contexts bare: required contexts are the job names. +# Check contexts are the job names and do not depend on this workflow's name. +# Keep the name distinct from the required workflow's: the concurrency group is +# built from the name and is scoped to the repository, so two workflows sharing +# a name would let their runs cancel each other. name: CI @@ -12,7 +15,11 @@ on: - develop concurrency: - group: ${{ github.workflow }}-${{ github.ref }}-${{ github.event_name }} + # The literal prefix is the separation. A concurrency group is scoped to the + # repository, not to one workflow, so without it this group would collide with + # any other workflow that happened to share this one's name. The tier is in the + # prefix so two tier files in one repository cannot collide either. + group: local-ci-alpha-${{ github.workflow }}-${{ github.ref }}-${{ github.event_name }} cancel-in-progress: true jobs: diff --git a/templates/BHE/ci-beta.yml b/templates/BHE/ci-beta.yml index 8e29c3d..5a03820 100644 --- a/templates/BHE/ci-beta.yml +++ b/templates/BHE/ci-beta.yml @@ -8,7 +8,10 @@ # repository-local copy is reduced, so the two definitions must stay identical: a # difference between them surfaces as two check runs of the same name disagreeing, # which is unreadable on a pull request. -# Workflow name CI keeps check contexts bare: required contexts are the job names. +# Check contexts are the job names and do not depend on this workflow's name. +# Keep the name distinct from the required workflow's: the concurrency group is +# built from the name and is scoped to the repository, so two workflows sharing +# a name would let their runs cancel each other. name: CI @@ -18,7 +21,11 @@ on: - develop concurrency: - group: ${{ github.workflow }}-${{ github.ref }}-${{ github.event_name }} + # The literal prefix is the separation. A concurrency group is scoped to the + # repository, not to one workflow, so without it this group would collide with + # any other workflow that happened to share this one's name. The tier is in the + # prefix so two tier files in one repository cannot collide either. + group: local-ci-beta-${{ github.workflow }}-${{ github.ref }}-${{ github.event_name }} cancel-in-progress: true jobs: diff --git a/templates/BHE/ci-prototype.yml b/templates/BHE/ci-prototype.yml index cb8d112..3b5adfc 100644 --- a/templates/BHE/ci-prototype.yml +++ b/templates/BHE/ci-prototype.yml @@ -3,7 +3,10 @@ # the BHoM variant. Copy to .github/workflows/ci-prototype.yml in each BHE # prototype repo. Runs on pull_request, non-blocking until a ruleset requires # its checks. -# Workflow name CI keeps check contexts bare: required contexts are the job names. +# Check contexts are the job names and do not depend on this workflow's name. +# Keep the name distinct from the required workflow's: the concurrency group is +# built from the name and is scoped to the repository, so two workflows sharing +# a name would let their runs cancel each other. name: CI @@ -13,7 +16,11 @@ on: - develop concurrency: - group: ${{ github.workflow }}-${{ github.ref }}-${{ github.event_name }} + # The literal prefix is the separation. A concurrency group is scoped to the + # repository, not to one workflow, so without it this group would collide with + # any other workflow that happened to share this one's name. The tier is in the + # prefix so two tier files in one repository cannot collide either. + group: local-ci-prototype-${{ github.workflow }}-${{ github.ref }}-${{ github.event_name }} cancel-in-progress: true jobs: diff --git a/templates/BHoM/ci-alpha.yml b/templates/BHoM/ci-alpha.yml index 6c33c48..46d585d 100644 --- a/templates/BHoM/ci-alpha.yml +++ b/templates/BHoM/ci-alpha.yml @@ -2,7 +2,10 @@ # copyright-compliance (BHoM enforces OSS copyright; the BHE variant omits it). # Copy to .github/workflows/ci-alpha.yml in each BHoM alpha repo. # Runs on pull_request, non-blocking until a ruleset requires its checks. -# Workflow name CI keeps check contexts bare: required contexts are the job names. +# Check contexts are the job names and do not depend on this workflow's name. +# Keep the name distinct from the required workflow's: the concurrency group is +# built from the name and is scoped to the repository, so two workflows sharing +# a name would let their runs cancel each other. name: CI @@ -12,7 +15,11 @@ on: - develop concurrency: - group: ${{ github.workflow }}-${{ github.ref }}-${{ github.event_name }} + # The literal prefix is the separation. A concurrency group is scoped to the + # repository, not to one workflow, so without it this group would collide with + # any other workflow that happened to share this one's name. The tier is in the + # prefix so two tier files in one repository cannot collide either. + group: local-ci-alpha-${{ github.workflow }}-${{ github.ref }}-${{ github.event_name }} cancel-in-progress: true jobs: diff --git a/templates/BHoM/ci-beta.yml b/templates/BHoM/ci-beta.yml index f811539..5683156 100644 --- a/templates/BHoM/ci-beta.yml +++ b/templates/BHoM/ci-beta.yml @@ -2,7 +2,10 @@ # copyright-compliance (BHoM enforces OSS copyright; the BHE variant omits it). # Copy to .github/workflows/ci-beta.yml in each BHoM beta repo. # Runs on pull_request, non-blocking until a ruleset requires its checks. -# Workflow name CI keeps check contexts bare: required contexts are the job names. +# Check contexts are the job names and do not depend on this workflow's name. +# Keep the name distinct from the required workflow's: the concurrency group is +# built from the name and is scoped to the repository, so two workflows sharing +# a name would let their runs cancel each other. name: CI @@ -12,7 +15,11 @@ on: - develop concurrency: - group: ${{ github.workflow }}-${{ github.ref }}-${{ github.event_name }} + # The literal prefix is the separation. A concurrency group is scoped to the + # repository, not to one workflow, so without it this group would collide with + # any other workflow that happened to share this one's name. The tier is in the + # prefix so two tier files in one repository cannot collide either. + group: local-ci-beta-${{ github.workflow }}-${{ github.ref }}-${{ github.event_name }} cancel-in-progress: true jobs: diff --git a/templates/BHoM/ci-prototype.yml b/templates/BHoM/ci-prototype.yml index 34498fa..99e5df4 100644 --- a/templates/BHoM/ci-prototype.yml +++ b/templates/BHoM/ci-prototype.yml @@ -2,7 +2,10 @@ # copyright-compliance (BHoM enforces OSS copyright; the BHE variant omits it). # Copy to .github/workflows/ci-prototype.yml in each BHoM prototype repo. # Runs on pull_request, non-blocking until a ruleset requires its checks. -# Workflow name CI keeps check contexts bare: required contexts are the job names. +# Check contexts are the job names and do not depend on this workflow's name. +# Keep the name distinct from the required workflow's: the concurrency group is +# built from the name and is scoped to the repository, so two workflows sharing +# a name would let their runs cancel each other. name: CI @@ -12,7 +15,11 @@ on: - develop concurrency: - group: ${{ github.workflow }}-${{ github.ref }}-${{ github.event_name }} + # The literal prefix is the separation. A concurrency group is scoped to the + # repository, not to one workflow, so without it this group would collide with + # any other workflow that happened to share this one's name. The tier is in the + # prefix so two tier files in one repository cannot collide either. + group: local-ci-prototype-${{ github.workflow }}-${{ github.ref }}-${{ github.event_name }} cancel-in-progress: true jobs: diff --git a/templates/ci-format.yml b/templates/ci-format.yml index 6fed4ad..7fb0fdb 100644 --- a/templates/ci-format.yml +++ b/templates/ci-format.yml @@ -4,7 +4,10 @@ # # Rulesets ignore event filters on required workflows, so this file has # no paths filter. The composite self-skips when no relevant files have changed. -# Workflow name CI keeps check contexts bare: required contexts are the job names. +# Check contexts are the job names and do not depend on this workflow's name. +# Keep the name distinct from the required workflow's: the concurrency group is +# built from the name and is scoped to the repository, so two workflows sharing +# a name would let their runs cancel each other. name: CI @@ -12,7 +15,11 @@ on: pull_request: concurrency: - group: ${{ github.workflow }}-${{ github.ref }}-${{ github.event_name }} + # The literal prefix is the separation. A concurrency group is scoped to the + # repository, not to one workflow, so without it this group would collide with + # any other workflow that happened to share this one's name. This file is a + # required-workflow source, so its prefix matches the other required workflows'. + group: required-ci-format-${{ github.workflow }}-${{ github.ref }}-${{ github.event_name }} cancel-in-progress: true jobs: diff --git a/templates/ci-unit-tests.yml b/templates/ci-unit-tests.yml index 526e9f8..16b90cb 100644 --- a/templates/ci-unit-tests.yml +++ b/templates/ci-unit-tests.yml @@ -8,7 +8,10 @@ # Extending orgs: override test_toolkit_repo via with: to point at a fork. # Dep forks must carry the relevant changes on the PR's base branch, # not the fork's default branch, since resolve-dependencies clones from the base. -# Workflow name CI keeps check contexts bare: required contexts are the job names. +# Check contexts are the job names and do not depend on this workflow's name. +# Keep the name distinct from the required workflow's: the concurrency group is +# built from the name and is scoped to the repository, so two workflows sharing +# a name would let their runs cancel each other. name: CI @@ -16,7 +19,11 @@ on: pull_request: concurrency: - group: ${{ github.workflow }}-${{ github.ref }}-${{ github.event_name }} + # The literal prefix is the separation. A concurrency group is scoped to the + # repository, not to one workflow, so without it this group would collide with + # any other workflow that happened to share this one's name. This file is a + # required-workflow source, so its prefix matches the other required workflows'. + group: required-ci-unit-tests-${{ github.workflow }}-${{ github.ref }}-${{ github.event_name }} cancel-in-progress: true jobs: