Skip to content

ci: skip push-triggered checks on forks#722

Draft
t-hamano wants to merge 1 commit into
WordPress:developfrom
t-hamano:ci/exclude-fork-runs
Draft

ci: skip push-triggered checks on forks#722
t-hamano wants to merge 1 commit into
WordPress:developfrom
t-hamano:ci/exclude-fork-runs

Conversation

@t-hamano

@t-hamano t-hamano commented Jun 14, 2026

Copy link
Copy Markdown
Contributor

What?

Skip the Test and Plugin Check jobs when they run on a fork.

Why?

When a fork syncs its branches with this repository, the resulting push re-runs these workflows on the fork, consuming the fork's CI minutes with no benefit. Please refer to https://github.com/t-hamano/ai/actions.

How?

Restrict CI execution to only when the repository is not forked or when the event is a pull request. The same technique is already used in wordpress-develop and gutenberg to avoid this.

Use of AI Tools

AI assistance: Yes
Tool(s): Claude Code
Model(s): Claude Opus 4.8
Used for: Drafting the workflow conditions and PR description; reviewed and verified by me.

Testing Instructions

  • The CI should run in this PR as before.
  • After this PR is merged, the CI should not run when a fork syncs its branches with this repository.

Changelog Entry

Developer - Skip push-triggered CI workflows on forks.

Open WordPress Playground Preview

When a fork syncs with the upstream WordPress/ai repository, the push to
develop/trunk re-runs the Test and Plugin Check workflows on the fork,
wasting CI minutes for no benefit. Gate those jobs so they run only on the
upstream repository or for pull requests, keeping PR CI intact on forks.

Co-Authored-By: Claude <noreply@anthropic.com>
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