Repository navigation
ci: Scheduled workflows do not run in forks (#1258) - #1259
Merged
Merged
Conversation
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]>
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.
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:release-rust.yamlchecksanitizers.yamlmatrixleaderboard.ymlupdateclaim-bot.yamlclaim(joined with its existingif:, soissue_commentdoes not change)scheduled.yamlcache-cleanupThe jobs that need a skipped root job are skipped with it. In
release-rust.yaml,windows_arm64_smoke,macos_smokeandreleaseusealways(), but they also requireneeds.check.result == 'success'.report-nightly-failureruns only onfailure().In obs-rust/obs-studio the condition is always true, so nothing changes here. In a fork,
workflow_dispatchand the other triggers still run.Not in this PR: the three
github.repository_owner == 'obsproject'guards inscheduled.yaml(from upstream OBS) stay as they are (see the claim on #1258).RED → GREEN
ci/test_workflow_schedule_guard.py(standard library only). It finds each workflow with aschedule:trigger and requires the condition on each root job. A job with theobsprojectguard 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.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.Checklist
master(or the description starts with a Stacked: note)-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)🤖 Generated with Claude Code