Skip to content

ci: Scheduled workflows do not run in forks (#1258) - #1259

Merged
zackees merged 2 commits into
obs-rust:masterfrom
vpacher:fix/1258-fork-schedule-guard
Oct 17, 2026
Merged

zackees merged 2 commits into
obs-rust:masterfrom
vpacher:fix/1258-fork-schedule-guard

Conversation

@vpacher

@vpacher vpacher commented Oct 17, 2026

Copy link
Copy Markdown
Member

Fixes #1258

What and why

GitHub runs a workflow's schedule: in every fork whose default branch has it. In a contributor's fork, five scheduled workflows failed or ran every day, and each failure sent the fork owner an email (#1258).

This PR adds one condition to the root job (a job with no needs:) of each scheduled workflow:

if: github.event_name != 'schedule' || github.repository == 'obs-rust/obs-studio'
Workflow Root job
release-rust.yaml check
sanitizers.yaml matrix
leaderboard.yml update
claim-bot.yaml claim (joined with its existing if:, so issue_comment does not change)
scheduled.yaml cache-cleanup

The jobs that need a skipped root job are skipped with it. In release-rust.yaml, windows_arm64_smoke, macos_smoke and release use always(), but they also require needs.check.result == 'success'. report-nightly-failure runs only on failure().

In obs-rust/obs-studio the condition is always true, so nothing changes here. In a fork, workflow_dispatch and the other triggers still run.

Not in this PR: the three github.repository_owner == 'obsproject' guards in scheduled.yaml (from upstream OBS) stay as they are (see the claim on #1258).

RED → GREEN

  • RED 9919b79: ci/test_workflow_schedule_guard.py (standard library only). It finds each workflow with a schedule: trigger and requires the condition on each root job. A job with the obsproject guard also passes, because it does not run in a fork. 1 of 5 fails on master: test_every_root_job_skips_a_scheduled_run_in_a_fork, with exactly the 5 root jobs above. The parser tests and the check that all 5 scheduled workflows are found pass.
  • GREEN dbb9c54: 5/5 pass. All of ci/test_*.py: the same failures and errors as on master, without this test (4 failures and 48 errors that are local to macOS, none in a changed file). The 5 changed workflows parse as YAML.
  • Real app: not applicable (CI only). Evidence from the fork vpacher/obs-studio on 2026-10-16 and 2026-10-17 is in bug: ci: scheduled workflows run on forks and fail every day #1258. A check after merge: the next scheduled runs in a synced fork show the jobs as skipped.

Checklist

  • Base is master (or the description starts with a Stacked: note)
  • I claimed the issue, or no one else has an open PR for it
  • Characterization test (if the unit had none), then RED, then GREEN commits
  • (Optional) Local gate passed and the pushed head is stamped; otherwise PR CI runs the full suite
  • Warning or flag changes (-W..., ratchets): built with scripting ON (a flag change under cmake/ or build-aux/ runs the full builds) and cross-checked with clang and MSVC (not applicable: no flag changes)
  • Intentional differences from C listed in the parity test header and rust/README.md (ports) (not applicable: no port)

🤖 Generated with Claude Code

vpacher and others added 2 commits October 17, 2026 17:34
Every root job (no needs:) of a workflow with a schedule: trigger must
skip a scheduled run outside obs-rust/obs-studio. Fails on master for
the root jobs of release-rust, sanitizers, leaderboard, claim-bot and
scheduled. In a contributor's fork these runs failed every day and sent
the fork owner a failure email for each.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
GitHub runs a workflow's schedule: in every fork whose default branch
has it. In a contributor's fork the release (no tags: git describe
fails), sanitizer, leaderboard (no push rights), claim-bot and nightly
runs failed or swept every day, and each failure mailed the fork owner.

The root job of each scheduled workflow (release-rust check, sanitizers
matrix, leaderboard update, claim-bot claim, scheduled cache-cleanup)
now skips a scheduled run outside obs-rust/obs-studio. The jobs that
need it are skipped with it: the always() jobs in release-rust also
require check to succeed. workflow_dispatch and the other triggers
still run in a fork. The three obsproject guards in scheduled.yaml do
not change.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@vpacher
vpacher requested a review from zackees as a code owner October 17, 2026 15:37
@zackees
zackees enabled auto-merge October 17, 2026 15:38
@zackees
zackees added this pull request to the merge queue Oct 17, 2026
Merged via the queue into obs-rust:master with commit 2d358b8 Oct 17, 2026
23 of 24 checks passed
@vpacher
vpacher deleted the fix/1258-fork-schedule-guard branch October 17, 2026 18:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

bug: ci: scheduled workflows run on forks and fail every day

2 participants