Guard scheduled workflows against forks - #3480
Merged
Merged
Conversation
SawyerHood
approved these changes
Sep 11, 2026
SawyerHood
left a comment
Collaborator
There was a problem hiding this comment.
Reviewed: job graph in publish-bb-app.yml is fully covered by the guard on the two root jobs, canonical-repo schedule behavior unchanged, fork PRs still label-gate correctly. Note: the mobile-e2e guard applies to every event rather than only schedule, which is stricter than the comment says but harmless in the canonical repo.
GitHub runs cron workflows in forks on the default branch. The nightly publish train, the iOS simulator E2E suite and the marketplace validation then run in every fork regardless of secrets or runner access. Gate scheduled runs on github.repository == 'get-bb/bb'; workflow_dispatch, push and pull_request triggers are unaffected. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
SawyerHood
force-pushed
the
ci/guard-scheduled-workflows
branch
from
September 11, 2026 15:52
44a0bb0 to
9ece01e
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Human comments
I'm getting daily emails about failed workflow runs on my fork which is a bit annoying. I know I can disable it on my fork but this might be better in the long run and less annoying for others too 😄
What was wrong
GitHub Actions runs
schedule:-triggered workflows in forks too, on the default branch. This repository has three cron workflows (.github/workflows/publish-bb-app.yml,mobile-e2e.yml,marketplace-v2-live.yml), none of which check which repository they run in, so every fork copies the nightly job load: a release-train run that attempts an npm publish it can never succeed at (nonpm-releaseOIDC configuration, no macOS signing/notarization or Expo secrets), two long desktop builds plus an EAS/TestFlight submission, a paid-runner iOS simulator E2E suite, and a marketplace validation run. Fork owners need to disable workflows manually to stop this.What changed
Added a fork guard so that scheduled runs are skipped outside the canonical repository while manual
workflow_dispatch(and all push/PR triggers) keep working everywhere:publish-bb-app.yml:if: github.event_name != 'schedule' || github.repository == 'get-bb/bb'on thepublishandpublish-plugin-sdkjobs. These two are the only nodes that start on thescheduletrigger; every other job (publish-nightly,nightly-desktop-*,nightly-mobile-ios,nightly-desktop-publish) already requires their upstream jobs to reportsuccess, so a skipped root skips them transitively.mobile-e2e.yml: the same repository check added to the existing label-basedifon theiosjob.marketplace-v2-live.yml: same guard on thevalidatejob.No
HOST_DAEMON_PROTOCOL_VERSION, CLI, or docs changes; workflow-only.How you verified
publishandpublish-plugin-sdkare skipped, andneeds.publish.result == 'success'(under!cancelled()) then skipsnightly-desktop-macos,nightly-desktop-linux, andnightly-mobile-ios;nightly-desktop-publishneeds those, so nothing runs. In the canonical repogithub.repository == 'get-bb/bb'holds, so nightly behavior is unchanged. Onworkflow_dispatch, the event-name clause short-circuits to true in any repository, so manual dry-run releases and iOS E2E runs still work in forks.Generated with Omen Alpha (Opencode Go) via Pi