Skip to content

feat(ci): dispatch a repository event when the main webapp image is published#3875

Merged
matt-aitken merged 1 commit into
mainfrom
feat/publish-dispatch-main-image
Jun 9, 2026
Merged

feat(ci): dispatch a repository event when the main webapp image is published#3875
matt-aitken merged 1 commit into
mainfrom
feat/publish-dispatch-main-image

Conversation

@matt-aitken

Copy link
Copy Markdown
Member

Summary

On every main build, once the webapp image is pushed to the registry, the publish workflow emits a cross-repo repository_dispatch event (main-image-published) carrying a digest-pinned image ref. Other repositories in the org can subscribe to that event and build or deploy from the exact artifact, instead of chasing the moving main tag.

Design

publish-webapp.yml now exposes the pushed multi-arch index digest as a workflow output. publish.yml adds a dispatch-main-image job (after publish-webapp) that builds <image_repo>@<digest> and sends the dispatch via the same pinned peter-evans/repository-dispatch action already used elsewhere in this repo, authed with CROSS_REPO_PAT.

It fires only when the published tag is main, so semver releases and other tag builds are excluded, and only from the canonical repo so forks never dispatch. The payload is JSON-escaped with jq.

@changeset-bot

changeset-bot Bot commented Jun 9, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 819da36

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@coderabbitai

coderabbitai Bot commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 4b10cabc-72fe-4209-8f69-cc1402c7b1b0

📥 Commits

Reviewing files that changed from the base of the PR and between 32b54a4 and 819da36.

📒 Files selected for processing (2)
  • .github/workflows/publish-webapp.yml
  • .github/workflows/publish.yml
🚧 Files skipped from review as they are similar to previous changes (1)
  • .github/workflows/publish-webapp.yml
📜 Recent review details
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
  • GitHub Check: audit
  • GitHub Check: audit
  • GitHub Check: Analyze (javascript-typescript)
  • GitHub Check: Analyze (actions)
🔇 Additional comments (2)
.github/workflows/publish.yml (2)

18-19: LGTM!


122-158: LGTM!


Walkthrough

This PR adds GitHub Actions infrastructure to export container image digests and trigger downstream jobs in a cloud repository. The publish-webapp workflow now outputs the multi-arch image digest from its build step, making it available to dependent workflows. A new dispatch-main-image job consumes this digest and sends a repository_dispatch event to triggerdotdev/cloud when main-branch versions are published in the canonical repository, passing the digest-pinned image reference and commit SHA as event payload data.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the main change: dispatching a repository event when the main webapp image is published, which aligns with the primary objective of the PR.
Description check ✅ Passed The description provides a comprehensive summary and design explanation covering the workflow changes, conditional logic, and purpose. All critical information is present and well-documented.
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 feat/publish-dispatch-main-image

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.

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no potential bugs to report.

View in Devin Review to see 3 additional findings.

Open in Devin Review

…ublished

After the webapp image is pushed on a main build, emit a repository_dispatch
(main-image-published) carrying a digest-pinned image ref so other repositories
in the org can build or deploy from the exact artifact rather than chasing the
moving main tag. Fires only for the mutable main tag, never semver releases or
other tag builds, and only from the canonical repo.
@matt-aitken matt-aitken force-pushed the feat/publish-dispatch-main-image branch from 32b54a4 to 819da36 Compare June 9, 2026 12:57
@matt-aitken matt-aitken enabled auto-merge (squash) June 9, 2026 13:02
@matt-aitken matt-aitken merged commit df964ea into main Jun 9, 2026
21 checks passed
@matt-aitken matt-aitken deleted the feat/publish-dispatch-main-image branch June 9, 2026 13:20
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