ci: push the release version bump with a token that re-triggers workflows - #31
Open
Engerim wants to merge 2 commits into
Open
ci: push the release version bump with a token that re-triggers workflows#31Engerim wants to merge 2 commits into
Engerim wants to merge 2 commits into
Conversation
…lows publish.yml checks out without an explicit token, so the credentials git-auto-commit-action reuses for its push are the default GITHUB_TOKEN. GitHub's recursion guard suppresses events from that token, so the "chore: release <version>" commit produces no push event and no workflow run. The PR head is then left with no compile/lint result and stays blocked on required checks. Observed on #30: head a0b0698 ("chore: release 2.0.0-beta.31106616457.0") has no Release deploy run, and the auto-merge run it did produce lists actor github-actions[bot] rather than bot-shop-ci. Checking out with REPO_READ_TOKEN makes the push come from bot-shop-ci, so the push event fires and Release deploy runs against the bumped commit. This is what the shared Flaconi/github-actions publish-node.yml already does; that workflow cannot be reused here because it lives in a private repository and this repository is public. It also makes two existing pieces of configuration live rather than dead code, both of which already assume bot pushes re-trigger CI: publish.yml's `github.event.pusher.name != 'bot-shop-ci'` anti-loop guard, and release.yml's inverted `skip` input. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The test job was gated on `! inputs.skip && needs.compile.result == 'skipped'`, which can never be true. compile itself runs `if: always() && ! inputs.skip`, so it is skipped only when inputs.skip is true — and in that case test's own `! inputs.skip` is false. When skip is false, compile runs and its result is never 'skipped'. Either way the job is skipped, so `yarn test` has never executed in CI. Gate on compile succeeding instead, matching the lint job. No behaviour change today beyond the job appearing in the run: this package's test script is currently `exit 0`. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Engerim
force-pushed
the
claude/shared-ci-workflows
branch
from
August 6, 2026 15:57
012c590 to
6e4795a
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes the case where a PR's head commit ends up with no CI results because the release workflow's own version-bump commit does not trigger anything.
The problem
publish.ymlchecks out without an explicit token, so the credentialsgit-auto-commit-actionreuses for its push are the defaultGITHUB_TOKEN. GitHub suppresses workflow runs for events triggered by that token — the recursion guard that stops a workflow that pushes from re-triggering itself. Thechore: release <version>commit therefore produces nopushevent,release.ymlnever runs against it, and the PR head is left with no compile/lint result and blocked on required checks.Observed on #30. Its head
a0b0698(chore: release 2.0.0-beta.31106616457.0) has noRelease deployrun:The only run is
Dependabot auto-merge, withactor: github-actions[bot]— confirming the push usedGITHUB_TOKENand not the bot PAT. Thecommit_user_name: bot-shop-ciand GPG settings only affect the commit author, not the pusher identity.The fix
Check out with
REPO_READ_TOKEN, so the push comes from bot-shop-ci and thepushevent fires:This is exactly what the shared
Flaconi/github-actionspublish-node.ymlalready does. That workflow cannot be reused here: it lives in a private repository and this repository is public, and a public repo cannot call a reusable workflow from a private one. (An earlier revision of this PR tried that and failed withworkflow was not found.)It also turns two existing pieces of configuration from dead code into live guards, both of which already assume bot pushes re-trigger CI:
publish.yml:if: github.event.pusher.name != 'bot-shop-ci' && ...— the anti-publish-loop guardrelease.yml:skip: ${{ github.event.pusher.name != 'bot-shop-ci' && ... }}— the "don't skip the build when the bot pushed" branchSecond commit: make the test job reachable
build.yml's test job was gated on! inputs.skip && needs.compile.result == 'skipped', which can never be true:if: always() && ! inputs.skip, so it is skipped only wheninputs.skipis true — and then test's own! inputs.skipis falseskipis false, compile runs and its result is neverskippedSo
yarn testhas never executed in CI. Now gated on compile succeeding, matching the lint job. No practical change today — this package's test script isexit 0— but the job will at least appear and run.Happy to drop that commit if you'd rather keep this PR to the one-line token change.
Before merging — please check
REPO_READ_TOKENmust have write scope. Despite the name it is now used to push. It already exists in this repo but is currently only used forgh pr review/gh pr mergeinauto-merge.yml. If it is read-only, the push step will fail.masterafter merge. With the push now re-triggering, thepusher.name != 'bot-shop-ci'guard becomes load-bearing for preventing a publish loop.Note on #30
This does not retroactively unblock #30 — that head commit still has no checks and needs a fresh push either way.
🤖 Generated with Claude Code