Skip to content

fix(release): dispatch deploy/dist workflows after sync-main push - #320

Merged
jackgranatowski merged 2 commits into
mainfrom
claude/configurator-version-sync-5zpmtb
Jun 13, 2026
Merged

fix(release): dispatch deploy/dist workflows after sync-main push#320
jackgranatowski merged 2 commits into
mainfrom
claude/configurator-version-sync-5zpmtb

Conversation

@jackgranatowski

@jackgranatowski jackgranatowski commented Jun 13, 2026

Copy link
Copy Markdown
Contributor

GITHUB_TOKEN pushes do not emit push events, so deploy-configurator.yml
and publish-dist.yml were never triggered by the sync-main commit.
This caused the configurator and CDN bundles to always show the previous
release version rather than the newly released one.

Fix: after a successful push to main, explicitly dispatch both downstream
workflows via the workflow_dispatch API, which GITHUB_TOKEN is permitted
to trigger.

https://claude.ai/code/session_01N4PS78g7vyvyQwyzivoiuu

Summary by CodeRabbit

  • Chores
    • Enhanced release workflow to improve downstream deployment triggering when using GitHub token-based authentication. Updated process now explicitly handles token limitations and ensures downstream deployment workflows are properly dispatched via API when version artifacts are pushed.

GITHUB_TOKEN pushes do not emit push events, so deploy-configurator.yml
and publish-dist.yml were never triggered by the sync-main commit.
This caused the configurator and CDN bundles to always show the previous
release version rather than the newly released one.

Fix: after a successful push to main, explicitly dispatch both downstream
workflows via the workflow_dispatch API, which GITHUB_TOKEN is permitted
to trigger.

https://claude.ai/code/session_01N4PS78g7vyvyQwyzivoiuu
@coderabbitai

coderabbitai Bot commented Jun 13, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@jackgranatowski, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 46 minutes and 47 seconds. Learn how PR review limits work.

Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file).

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 0a43db02-b8d6-4aea-a17f-40ea8d08f4d6

📥 Commits

Reviewing files that changed from the base of the PR and between 3c2dbd4 and 0552704.

📒 Files selected for processing (1)
  • .github/workflows/release.yml
📝 Walkthrough

Walkthrough

The release workflow now detects when version artifacts are pushed during the sync-main job and explicitly dispatches downstream workflows via the GitHub Actions API, since pushes made with GITHUB_TOKEN do not trigger push-based workflow events.

Changes

Explicit downstream workflow dispatch

Layer / File(s) Summary
Explicit dispatch mechanism
.github/workflows/release.yml
Documentation clarifies that GITHUB_TOKEN pushes do not trigger push-based events. The commit/push step outputs a pushed flag, and a new conditional step dispatches deploy-configurator.yml and publish-dist.yml via GitHub Actions API when artifacts were actually pushed.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely summarizes the main change: dispatching downstream deploy/dist workflows after the sync-main job pushes version artifacts.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch claude/configurator-version-sync-5zpmtb

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (1)
.github/workflows/release.yml (1)

206-217: ⚡ Quick win

Consider using the GitHub CLI instead of curl for clearer error messages.

The current curl approach is functional, but the GitHub CLI (gh) is pre-installed on ubuntu-latest runners and provides simpler syntax with better error messages. The current implementation will fail fast if the first workflow dispatch fails (due to curl -f), preventing the second dispatch from running.

♻️ Alternative implementation using gh CLI
       - name: Trigger downstream deploys
         if: steps.commit_push.outputs.pushed == 'true'
         env:
           GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
         run: |
           # GITHUB_TOKEN pushes do not emit push events, so deploy-configurator
           # and publish-dist would never see the new version. Dispatch them
           # explicitly — GITHUB_TOKEN CAN trigger workflow_dispatch events.
-          for wf in deploy-configurator.yml publish-dist.yml; do
-            curl -sS -f -X POST \
-              -H "Authorization: Bearer ${GITHUB_TOKEN}" \
-              -H "Accept: application/vnd.github.v3+json" \
-              "https://api.github.com/repos/${GITHUB_REPOSITORY}/actions/workflows/${wf}/dispatches" \
-              -d '{"ref":"main"}'
-            echo "Dispatched ${wf}"
-          done
+          gh workflow run deploy-configurator.yml --ref main
+          echo "Dispatched deploy-configurator.yml"
+          gh workflow run publish-dist.yml --ref main
+          echo "Dispatched publish-dist.yml"

Benefits:

  • Simpler syntax
  • Better error messages if dispatch fails
  • More idiomatic for GitHub Actions
  • Each dispatch is independent (one failure won't prevent the other)
🤖 Prompt for 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.

In @.github/workflows/release.yml around lines 206 - 217, Replace the curl-based
dispatch loop with gh CLI calls: in the existing loop that iterates over
deploy-configurator.yml and publish-dist.yml (the block containing the curl -X
POST ... "dispatches" invocation), call gh workflow run "$wf" --ref main (or gh
workflow run <workflow_file> --ref main) for each workflow instead of curl, echo
the result, and ensure each gh invocation is run independently so a failure in
one does not prevent the next (e.g., do not set -e for the loop or append ||
true to each call if needed). This removes the manual Authorization headers and
leverages the pre-installed gh for clearer error messages and simpler syntax.
🤖 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/release.yml:
- Around line 202-217: The sync-main job’s GITHUB_TOKEN lacks actions: write so
the REST workflow_dispatch calls in the "Trigger downstream deploys" step can
403; add permissions: actions: write (either at the workflow level or inside the
sync-main job) so the token can dispatch workflows, and optionally change the
curl invocation (remove -f or handle per-workflow errors in the loop) so a
single failed dispatch doesn’t stop the remaining dispatches.

---

Nitpick comments:
In @.github/workflows/release.yml:
- Around line 206-217: Replace the curl-based dispatch loop with gh CLI calls:
in the existing loop that iterates over deploy-configurator.yml and
publish-dist.yml (the block containing the curl -X POST ... "dispatches"
invocation), call gh workflow run "$wf" --ref main (or gh workflow run
<workflow_file> --ref main) for each workflow instead of curl, echo the result,
and ensure each gh invocation is run independently so a failure in one does not
prevent the next (e.g., do not set -e for the loop or append || true to each
call if needed). This removes the manual Authorization headers and leverages the
pre-installed gh for clearer error messages and simpler syntax.
🪄 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: a2422a65-5387-4151-a7a2-1e680e126b40

📥 Commits

Reviewing files that changed from the base of the PR and between d11dabc and 3c2dbd4.

📒 Files selected for processing (1)
  • .github/workflows/release.yml

Comment thread .github/workflows/release.yml Outdated
- Add `actions: write` to sync-main job permissions so GITHUB_TOKEN is
  authorised to call the workflow_dispatch REST endpoint (without it the
  curl/gh call returns 403).
- Replace curl loop with two independent `gh workflow run` calls:
  each dispatch is its own statement so a failure in one does not abort
  the other, and gh provides clearer error messages than raw curl.

https://claude.ai/code/session_01N4PS78g7vyvyQwyzivoiuu
@jackgranatowski
jackgranatowski merged commit 1d9850b into main Jun 13, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants