Skip to content

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

Closed

Description

@vpacher

Summary

Five workflows have a schedule: trigger and no repository guard. When a contributor syncs a fork's master, GitHub starts these schedules in the fork. They fail there, and each failure sends an email to the fork owner. The release run also uses about 20 to 26 runner minutes of the fork owner's account each day.

Location

Workflow Cron Unguarded root job (a job with no needs:)
.github/workflows/release-rust.yaml 0 9 * * * check (all other jobs need it)
.github/workflows/sanitizers.yaml 41 6 * * * matrix (sanitize needs it)
.github/workflows/leaderboard.yml 17 */4 * * * update
.github/workflows/claim-bot.yaml 23 * * * * claim (the hourly sweep)
.github/workflows/scheduled.yaml 17 0 * * * cache-cleanup (build-project and analyze-project need it)

scheduled.yaml already guards three jobs with github.repository_owner == 'obsproject' (from upstream OBS). Those jobs are skipped in obs-rust/obs-studio too.

Class

CI configuration (logic error). No effect on the product.

How it is reached

  1. Fork obs-rust/obs-studio and sync master (the fork has Actions enabled).
  2. Wait one day.

Runs in vpacher/obs-studio on 2026-10-16 and 2026-10-17:

  • Release OBS-Studio-Rust: failure, 2 runs. Package OBS-Studio-Rust: fatal: No names found, cannot describe anything. A fork has no tags.
  • Contributor leaderboard: failure, 5 runs. actions/checkout fails with git exit code 1.
  • Sanitizers: failure. No results (build failed?).
  • Scheduled: startup_failure.
  • Claim bot: success, but it sweeps the fork every hour.

PR CI is not affected. A PR from a fork runs in obs-rust/obs-studio.

The workaround today is to disable Actions on the fork.

Proposed fix and failing test

Fix: add this condition to each unguarded root job (a job with no needs:):

if: github.event_name != 'schedule' || github.repository == 'obs-rust/obs-studio'

Jobs that need a skipped root job are skipped too. In release-rust.yaml, windows_arm64_smoke, macos_smoke and release use always(), but they also require needs.check.result == 'success', so they are skipped. report-nightly-failure in scheduled.yaml runs only on failure(), so it is skipped too. workflow_dispatch keeps working in a fork, so a contributor can still start a run by hand. In claim-bot.yaml, add the condition to the existing if:, so that issue_comment does not change.

Test (ci/test_workflow_schedule_guard.py, standard library only, as #1199 requires): for each workflow in .github/workflows with a schedule: trigger, each root job must have an if: that contains github.repository == 'obs-rust/obs-studio'.

  • RED: fails on master for the 5 workflows above.
  • GREEN: passes after the fix.

Open question: should the three obsproject guards in scheduled.yaml change to obs-rust/obs-studio? The answer is different for each job (services check, language upload, Steam upload), so this issue does not change them.

Activity

  1. vpacher commented on Oct 17, 2026

    @vpacher
    MemberAuthor

    Claiming: #1258

    Plan (one PR):

    1. RED: ci/test_workflow_schedule_guard.py (standard library only). Each root job of a workflow with a schedule: trigger must have the repository guard. It fails on master for the 5 workflows.
    2. GREEN: add if: github.event_name != 'schedule' || github.repository == 'obs-rust/obs-studio' to check, matrix, update, claim (joined with its existing if:) and cache-cleanup.

    Decisions: the three github.repository_owner == 'obsproject' guards in scheduled.yaml stay as they are. A change would start the services check, the language upload or the Steam upload in obs-rust, and each needs its own decision. A maintainer can open a separate issue for that.

    PR today.

  2. added
    claimed
    on Oct 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    claimed

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions