ci: keep scheduled workflows from running on forks - #823
Conversation
Co-authored-by: HuggeK <48095810+HuggeK@users.noreply.github.com>
miravoss26
left a comment
There was a problem hiding this comment.
Guards two scheduled workflows (bundled-driver-pin, rpi-image-build) so they only fire on srcfl/ftw for schedule events — a fork that syncs master no longer inherits an hourly/monthly job that fails or burns runner time for its owner. Manual dispatch and pushes still run everywhere, which is the right scope for "deliberate" vs "inherited."
- Correctness: the
if:conditions read right —github.repository == 'srcfl/ftw' || github.event_name != 'schedule'lets non-schedule events through unconditionally on any repo, and gates only the schedule case to the upstream repo. Matches the stated intent exactly. - Security: no secrets, no new permissions, no new external calls — pure workflow-trigger scoping.
- All checks green.
Safe to merge from my read.
|
Current merge review:
The branch is behind |
frahlg
left a comment
There was a problem hiding this comment.
CODEOWNER review complete on the current head. The two guards scope only inherited schedule runs on forks, keep deliberate push and manual runs, and add no permissions or external calls. The branch is current, the diff has no open-PR overlap, and fresh checks pass.
Forks inherit
.github/workflows/the moment they sync master, and both scheduled workflows misfire when a fork runs them unattended:This gates only the
scheduleevent tosrcfl/ftw. Manual dispatches and pushes are somebody deliberately asking, so they still run everywhere — including on forks.Observed on a real fork
HuggeK/ftw(issues disabled, Actions enabled) failedbundled driver pinon both of the last two mornings — e.g. this run, which correctly detects the pin is behind and then dies onthe 'HuggeK/ftw' repository has disabled issues. The same fork's monthly schedule also built and published an installer release to its ownrpi-installertag on August 1st.The new
debian base currencyworkflow proposed in #733 has the same shape; the matching guard is being added on that branch rather than here, since that file only exists there.CI-only change, so it rides the changeset auto-exemption.
🤖 Generated with Claude Code