ci(workflows): isolated manual workflow_dispatch runs in release concurrency groups
- Updated the CI workflow concurrency rules to treat `workflow_dispatch` like a release path, grouping those runs by SHA and disabling cancel-in-progress. - Extended the `GhaEval` expression evaluator in `scripts/ci-concurrency.test.ts` to support `==`/`!=` and align falsy checks. - Added a regression test covering tagged-main `workflow_dispatch` runs using the release-style concurrency behavior.
This commit is contained in:
@@ -16,13 +16,13 @@ on:
|
||||
# the cheap branch-wide `CI-refs/heads/main` group meant a later main push
|
||||
# silently cancelled the in-flight release and left the tag without a GitHub
|
||||
# Release or npm publish (#2564). Detect release runs at workflow-scheduling
|
||||
# time via the release-script commit subject (`chore: bump version to vX.Y.Z`,
|
||||
# see scripts/release.ts) and via `v*` tag-ref dispatches, then scope them to
|
||||
# a per-sha group with no cancellation. Every other event keeps the
|
||||
# branch-wide cancel-in-progress for PR/main churn.
|
||||
# time via the release-script commit subject (`chore: bump version to vX.Y.Z`),
|
||||
# via `v*` tag-ref dispatches, and via manual dispatches whose tag-on-HEAD
|
||||
# status is only known after checkout; scope them to a per-sha group with no
|
||||
# cancellation. Every other event keeps branch-wide cancellation for PR/main churn.
|
||||
concurrency:
|
||||
group: "${{ github.workflow }}-${{ (startsWith(github.event.head_commit.message, 'chore: bump version to ') || startsWith(github.ref, 'refs/tags/v')) && format('release-{0}', github.sha) || github.ref }}"
|
||||
cancel-in-progress: "${{ !(startsWith(github.event.head_commit.message, 'chore: bump version to ') || startsWith(github.ref, 'refs/tags/v')) }}"
|
||||
group: "${{ github.workflow }}-${{ (startsWith(github.event.head_commit.message, 'chore: bump version to ') || startsWith(github.ref, 'refs/tags/v') || github.event_name == 'workflow_dispatch') && format('release-{0}', github.sha) || github.ref }}"
|
||||
cancel-in-progress: "${{ !(startsWith(github.event.head_commit.message, 'chore: bump version to ') || startsWith(github.ref, 'refs/tags/v') || github.event_name == 'workflow_dispatch') }}"
|
||||
|
||||
env:
|
||||
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
|
||||
|
||||
Reference in New Issue
Block a user