ci: dispatch armbian/website sync after web-directory generation#310
Conversation
When 'Web: Generate github.armbian.com content' finishes, fire a
repository_dispatch at armbian/website so the public site rebuilds
against the freshly published directory listing. Same
peter-evans/repository-dispatch + secrets.DISPATCH pattern this repo
already uses for cross-repo triggers (generate-actions-report.yml).
Implementation notes:
- workflow_run trigger watches the source workflow by name; only
fires when conclusion == 'success'.
- Soft-skip via 'if: env.DISPATCH != \"\"' if the org PAT secret
isn't configured — avoids hard-red runs.
- Fork guard via 'github.repository_owner == \"armbian\"' so user
forks don't accidentally fire dispatches at the canonical
armbian/website.
- workflow_dispatch always allowed for manual one-off retries.
- event-type 'sync' matches the listener at the top of
armbian/website/.github/workflows/website-sync.yml.
|
Warning Rate limit exceeded
You’ve run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the 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 have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
WalkthroughThis pull request adds a new GitHub Actions workflow that bridges two repositories. The workflow listens for completion of the Estimated code review effort🎯 1 (Trivial) | ⏱️ ~5 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ 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 |
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/infrastructure-dispatch-website-sync.yml:
- Around line 10-13: The workflow_run trigger is missing a branch filter so any
run of the "Web: Generate github.armbian.com content" workflow (including
non-main branches) can trigger this dispatch; update the workflow_run block that
references workflows: ["Web: Generate github.armbian.com content"] and types:
[completed] to include a branches (or branches-ignore) filter (e.g., branches:
["main"]) so the cross-repo dispatch only runs when the source workflow
completed on the production branch; keep the existing workflow_dispatch entry
unchanged.
🪄 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
Run ID: 78597e6a-71ec-41e9-82f6-30cc362d98bc
📒 Files selected for processing (1)
.github/workflows/infrastructure-dispatch-website-sync.yml
Add 'branches: [main]' to the workflow_run filter so feature- and test-branch runs of the generator can't trigger a production dispatch at armbian/website. workflow_dispatch is left unfiltered for manual one-off retries.
Summary
After
Web: Generate github.armbian.com contentfinishes, fire arepository_dispatchatarmbian/websiteso the public site rebuilds against the freshly published directory listing.Same shape this repo already uses for cross-repo dispatch — see
generate-actions-report.yml.peter-evans/repository-dispatch@v4+secrets.DISPATCHorg PAT.Behaviour matrix
workflow_runafterWeb: Generate github.armbian.com…armbiansuccessarmbiansuccessarmbianif)if)workflow_dispatcharmbianWhy gate on
conclusion == 'success'A red generator run would push partial / inconsistent directory data; rebuilding the production site against that state surfaces broken pages. Better to no-op until the generator is green.
Event type
sync— matches the listener at line 4 of the target workflow.Test plan
workflow_dispatchof this new workflow as a smoke test.Website: Trigger data syncruns inarmbian/website.Web: Generate github.armbian.com content; verify this workflow fires only when the generator succeeded and the target workflow runs.armbian/website).