Skip to content

ci: dispatch armbian/website sync after web-directory generation#310

Merged
igorpecovnik merged 2 commits into
mainfrom
dispatch-website-sync-after-web-directory
May 10, 2026
Merged

ci: dispatch armbian/website sync after web-directory generation#310
igorpecovnik merged 2 commits into
mainfrom
dispatch-website-sync-after-web-directory

Conversation

@igorpecovnik
Copy link
Copy Markdown
Member

Summary

After 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 shape this repo already uses for cross-repo dispatch — see generate-actions-report.yml. peter-evans/repository-dispatch@v4 + secrets.DISPATCH org PAT.

Behaviour matrix

Trigger Owner Upstream conclusion Secret set Action
workflow_run after Web: Generate github.armbian.com… armbian success yes dispatch
same armbian success no step soft-skips
same armbian failure / cancelled job skipped (if)
same fork owner any job skipped (if)
Manual workflow_dispatch armbian n/a yes dispatch

Why 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

  • Merge to main; trigger a manual workflow_dispatch of this new workflow as a smoke test.
  • Confirm the dispatch lands by watching Website: Trigger data sync runs in armbian/website.
  • Trigger Web: Generate github.armbian.com content; verify this workflow fires only when the generator succeeded and the target workflow runs.
  • Confirm a forked clone running this workflow no-ops (no spurious dispatches at armbian/website).

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.
@github-actions github-actions Bot added 05 Milestone: Second quarter release size/small PR with less then 50 lines GitHub Actions GitHub Actions code Needs review Seeking for review labels May 10, 2026
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 10, 2026

Review Change Stack

Warning

Rate limit exceeded

@igorpecovnik has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 55 minutes and 35 seconds before requesting another review.

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 @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 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 configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: f7ddd9d8-6c41-4c54-974f-9ae46dee9cd2

📥 Commits

Reviewing files that changed from the base of the PR and between d0e350f and ac44e4d.

📒 Files selected for processing (1)
  • .github/workflows/infrastructure-dispatch-website-sync.yml

Walkthrough

This pull request adds a new GitHub Actions workflow that bridges two repositories. The workflow listens for completion of the Web: Generate github.armbian.com content workflow and automatically triggers a cross-repository dispatch event to armbian/website with event type sync. The dispatch is guarded by repository ownership checks, upstream run success status, and the presence of a DISPATCH secret. The action includes source workflow metadata in the payload for traceability.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~5 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely summarizes the main change: adding a CI workflow that dispatches to armbian/website after web-directory generation completes.
Description check ✅ Passed The description is comprehensive and directly related to the changeset, providing context, behavior matrix, rationale, and test plan for the new workflow.
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 dispatch-website-sync-after-web-directory

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.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

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

📥 Commits

Reviewing files that changed from the base of the PR and between b5aa205 and d0e350f.

📒 Files selected for processing (1)
  • .github/workflows/infrastructure-dispatch-website-sync.yml

Comment thread .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.
@github-actions github-actions Bot added size/medium PR with more then 50 and less then 250 lines and removed size/small PR with less then 50 lines labels May 10, 2026
@igorpecovnik igorpecovnik merged commit 1b3177d into main May 10, 2026
5 checks passed
@igorpecovnik igorpecovnik deleted the dispatch-website-sync-after-web-directory branch May 10, 2026 17:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

05 Milestone: Second quarter release GitHub Actions GitHub Actions code Needs review Seeking for review size/medium PR with more then 50 and less then 250 lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant