Skip to content

Commit 701ecfd

Browse files
SK-3023 use [AUTOMATED] head-commit guard instead of [skip ci] (v3 release)
Replaces the [skip ci] approach with a scoped guard on internal-release.yml so the PAT-authored version bump can't re-trigger the release, WITHOUT globally skipping CI (PR checks run again). - internal-release.yml: add `if: !contains(head_commit.message, '[AUTOMATED]')` - shared-build-and-deploy.yml: drop the ` [skip ci]` suffix from the bump commit Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent c45bd3c commit 701ecfd

2 files changed

Lines changed: 9 additions & 4 deletions

File tree

.github/workflows/internal-release.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@ on:
1212

1313
jobs:
1414
build-and-deploy-v3:
15+
# Skip the automated version-bump commit so it can't re-trigger this workflow.
16+
# The bump is pushed with a PAT (which, unlike GITHUB_TOKEN, DOES trigger workflows),
17+
# so without this guard the release loops: bump -> push -> release -> bump -> ...
18+
if: ${{ !contains(github.event.head_commit.message, '[AUTOMATED]') }}
1519
uses: ./.github/workflows/shared-build-and-deploy.yml
1620
with:
1721
ref: ${{ github.ref_name }}

.github/workflows/shared-build-and-deploy.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -118,10 +118,11 @@ jobs:
118118
119119
git add v3/pom.xml
120120
if [[ "${{ inputs.tag }}" == "internal" ]]; then
121-
# [skip ci]: the version-bump push uses a PAT (see checkout above), and PAT-authored
122-
# pushes DO trigger workflows (unlike GITHUB_TOKEN). Without this marker the push
123-
# re-triggers this same internal-release workflow -> bump -> push -> infinite loop.
124-
git commit -m "[AUTOMATED] Private Release ${{ steps.previoustag.outputs.tag }}-dev-$(git rev-parse --short $GITHUB_SHA) [skip ci]"
121+
# The '[AUTOMATED]' marker is what stops the release loop: internal-release.yml
122+
# skips any push whose head commit contains it (the bump is pushed with a PAT,
123+
# which — unlike GITHUB_TOKEN — DOES trigger workflows). Keep the marker in sync
124+
# with that guard. This keeps PR CI intact (no global [skip ci]).
125+
git commit -m "[AUTOMATED] Private Release ${{ steps.previoustag.outputs.tag }}-dev-$(git rev-parse --short $GITHUB_SHA)"
125126
git push origin ${{ github.ref_name }} -f
126127
fi
127128
if [[ "${{ inputs.tag }}" == "beta" || "${{ inputs.tag }}" == "public" ]]; then

0 commit comments

Comments
 (0)