Make the release workflow work with the master branch protection - #2761
Conversation
Pushing the version commit straight to master cannot work: the branch requires a pull request and 6 status checks, and no bypass is granted to the bot, so the dispatched workflow failed with GH006. Opening that pull request from the workflow does not help either, since GitHub does not run checks on a pull request created with the GITHUB_TOKEN. - Prepare release: bumps the version on a release/vX.Y.Z branch and links to the pull request to open - Create release tag: on a version change on master, tags it and dispatches the production images, demo website and apidoc builds Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NpWWjywQsozhFp7pgsz1Cy
|
Warning Review limit reached
Next review available in: 41 seconds Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughChangesRelease automation
Estimated code review effort: 3 (Moderate) | ~20 minutes Sequence Diagram(s)sequenceDiagram
participant Maintainer
participant PrepareRelease
participant Master
participant CreateReleaseTag
participant ReleaseWorkflows
Maintainer->>PrepareRelease: Select patch or minor release
PrepareRelease->>Master: Push release branch and version commit
Master->>CreateReleaseTag: Merge package.json change
CreateReleaseTag->>CreateReleaseTag: Check for existing version tag
CreateReleaseTag->>ReleaseWorkflows: Dispatch workflows with new tag
Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
🐳 A Docker image has been built for this branch and pushed to the GitHub Container Registry. You can test this pull request (AMD64 only) by pulling the image below: For example, run it with: sudo docker run -d \
--log-driver json-file \
--log-opt max-size=10m \
--cgroupns=host \
--restart=always \
--privileged \
--network=host \
--name gladys-claude-github-action-release-tag-ht845u \
-e NODE_ENV=production \
-e SERVER_PORT=80 \
-e TZ=Europe/Paris \
-e SQLITE_FILE_PATH=/var/lib/gladysassistant/gladys-production.db \
-v /var/run/docker.sock:/var/run/docker.sock \
-v /var/lib/gladysassistant:/var/lib/gladysassistant \
-v /dev:/dev \
-v /run/udev:/run/udev:ro \
ghcr.io/gladysassistant/gladys-preview:claude-github-action-release-tag-ht845uThis comment and the image are automatically updated on every new commit pushed to this pull request. Need an ARM64 image (Raspberry Pi, Apple Silicon, …)? Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.github/workflows/create-release-tag.yml:
- Around line 54-68: Update the release dispatch step around the workflow loop
to recover when an individual gh workflow run fails after the tag is created,
ensuring later workflows still run and incomplete dispatches can be retried. Add
an explicit manual retry path for the existing tag, or persist per-workflow
dispatch state and retry only failed workflows; keep normal push runs from
dispatching every existing tag.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 38acd752-a4e3-42e9-86e2-36991fee8dbc
📒 Files selected for processing (2)
.github/workflows/create-release-tag.yml.github/workflows/prepare-release.yml
There was a problem hiding this comment.
Stale comment
The two-step release flow is a clear fix for the
GH006/ branch-protection problem from #2753, and the "human opens the PR so checks actually run" constraint is documented well.I am not approving yet:
create-release-taghas a recovery footgun on the production release path (tag pushed, downstream dispatch fails → re-run becomes a no-op). Details inline.Also labeling
risk:highbecause this workflow is what publishes production images, the demo site, and apidoc.Sent by Cursor Automation: Automatic PR review
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #2761 +/- ##
=======================================
Coverage 99.15% 99.15%
=======================================
Files 1190 1190
Lines 25057 25057
=======================================
Hits 24846 24846
Misses 211 211 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
A tag pushed before a failing dispatch used to be a dead end: re-running the job found the tag and skipped everything, with no way left to start the builds. - Only skip tag creation when the tag exists, and still dispatch when it points at the commit being released, so a re-run replays the missing dispatches - Retry each dispatch, the tag may not be visible to the API right after the push - Fail with an explicit message when the release branch already exists Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NpWWjywQsozhFp7pgsz1Cy
Deploying gladys-plus with
|
| Latest commit: |
014039b
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://a0b2721e.gladys-plus.pages.dev |
| Branch Preview URL: | https://claude-github-action-release.gladys-plus.pages.dev |
There was a problem hiding this comment.
Follow-up commit 014039b addresses the blocking recovery issue from the previous review.
What looks good now
- Split prepare (human-opened PR so required checks run) → tag-on-
masteris the right shape for branch protection without a bypass token. - Tag creation and dispatch are separated: if the tag already points at
GITHUB_SHA, the job still re-dispatches, so a failedgh workflow runloop is recoverable via Actions re-run. - Retry around each dispatch covers the common “tag not visible to the API yet” race.
prepare-releasefails clearly whenrelease/vX.Y.Zalready exists on the remote.- The workflow header documents that editing root
package.jsonversiononmasterships a release.
Residual (non-blocking)
- A re-run always re-dispatches all three downstream workflows (including ones that already started). That is the right tradeoff for recovery; operators can also
workflow_dispatchthose workflows on the tag directly if needed. - There is still no
workflow_dispatchoncreate-release-tagitself — recovery is “re-run this job” or manual downstream dispatch. Fine given the error text and the downstream triggers.
Keeping risk:high because this path publishes production images, demo, and apidoc. No needs:human-review — this is mechanical CI/protection plumbing, not product philosophy.
CI is green. Approving.
Sent by Cursor Automation: Automatic PR review


Description
Follow-up to #2753. The workflow it added could not actually run a release: pushing the version commit to
masterfailed withGH006, because the branch requires a pull request and 6 status checks, andgithub-actions[bot]has no bypass.Having the workflow open that pull request itself does not solve it either — GitHub does not run checks on a pull request created with the
GITHUB_TOKEN, so it would stay blocked on the required checks forever. A one-click release would need an identity allowed to bypass the protection (a GitHub App token or an admin PAT). Instead, this splits the release in two so it works with the protection as it stands, and with no secret to configure.prepare-release.yml— manual dispatch,patchorminor. Bumps the version withnpm version --no-git-tag-version, commits it on arelease/vX.Y.Zbranch, pushes that branch, and links to the pull request to open from the job summary. Because a human opens it, the required checks run — so the release commit is tested before it is tagged.create-release-tag.yml— now triggered by a push onmastertouchingpackage.json. It reads the version, and if no matching tag exists, createsvX.Y.Zand dispatches the production images, demo website and apidoc builds. Tags are not covered by the branch protection, so theGITHUB_TOKENis enough. It is idempotent: apackage.jsonchange without a version bump does nothing.Side effect worth noting: this also covers the current manual process. A bump commit pushed by hand to
masternow gets tagged and released automatically, without going throughprepare-release.The explicit dispatch of the downstream builds is kept from #2753: a tag pushed with the
GITHUB_TOKENdoes not trigger workflows listening onpush: tags, andworkflow_dispatchis one of the two events GitHub does start from that token.Forum
N/A
Checklist
Generated by Claude Code
Summary by CodeRabbit