Skip to content

ci: run fresh-install workflows only in the upstream repo - #353

Open
ZheFeng7110 wants to merge 1 commit into
mcpp-community:mainfrom
ZheFeng7110:fix/limit-scheduled-ci-to-upstream
Open

ci: run fresh-install workflows only in the upstream repo#353
ZheFeng7110 wants to merge 1 commit into
mcpp-community:mainfrom
ZheFeng7110:fix/limit-scheduled-ci-to-upstream

Conversation

@ZheFeng7110

Copy link
Copy Markdown
Member

Summary

Gate every job in ci-fresh-install.yml and ci-aarch64-fresh-install.yml with github.repository == 'mcpp-community/mcpp', so the scheduled runs never execute in forks.

Why

Both workflows have schedule triggers:

  • ci-fresh-install.yml: daily cron (0 6 * * *)
  • ci-aarch64-fresh-install.yml: weekly Monday cron (0 6 * * 1)

GitHub runs schedule-triggered workflows on the repository's default branch and is not affected by the branches: [main] filters used by the push/pull_request triggers. A fork that renames its default branch (e.g. mainfork-main to stop push CI) still gets the cron executing on the renamed branch — wasting the fork's Actions quota and showing failing runs (fresh-install only tests released mcpp, so it provides zero value on a fork). Observed on a fork on 2026-08-03 (both workflows) and 2026-08-04 (daily one), all triggered by schedule, with no sync/push involved.

The workflow_run: [release] trigger is unaffected: it already fires only in the upstream repo, and the repository guard makes the schedule/manual/release paths no-ops on forks.

Impact on upstream

Identical behavior: all jobs still run on every upstream trigger (release → workflow_run, manual, daily/weekly schedule). PRs against upstream are unaffected — they run the self-host suites (ci-linux / ci-macos / ci-windows), which are untouched.

Test plan

  • YAML syntax validated (both files parse cleanly)
  • Upstream cron still runs as before
  • Forks no longer execute these workflows on schedule

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant