Skip to content

Skip CI for pull requests that only change documentation - #6127

Merged
danielmarbach merged 6 commits into
masterfrom
ci-skip-docs-only
Nov 17, 2026
Merged

danielmarbach merged 6 commits into
masterfrom
ci-skip-docs-only

Conversation

@danielmarbach

@danielmarbach danielmarbach commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

Pull requests that only change docs/**/*.md or AGENTS.md no longer run CI.

ci.yml ignores those paths on pull_request. Because the required checks would then stay pending, the new ci-docs-skip.yml triggers on the same paths and reports every CI check name as passed. Its job names mirror ci.yml, including the reusable-workflow names such as containers / servicecontrol. ci-docs-skip.yml must be updated whenever a ci.yml job or matrix entry changes.

A pull request that changes both docs and code matches both workflows, so the shadow checks and the real checks share names. In a test with such a pull request, GitHub kept it blocked while the real jobs ran. All real and shadow checks passed once the jobs finished. A docs-only pull request ran only the shadow workflow and was mergeable.

code-analysis.yml is unchanged and still runs on docs-only pull requests.

Docs reviewed: docs/README.md, CONTRIBUTING.md, and the other pages under docs/. None describes ci.yml, so no update is needed.

@danielmarbach

Copy link
Copy Markdown
Contributor Author

See also #6128

@danielmarbach
danielmarbach marked this pull request as ready for review November 13, 2026 00:39
Comment thread .github/workflows/ci-docs-skip.yml Resolved
Comment thread .github/workflows/ci.yml
- release-*
pull_request:
# Keep in sync with ci-docs-skip.yml
paths-ignore:

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remind me what you said last week - what happens when a single PR contains changes to .md files AND to code files? Would both workflows run? And then what is reported?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It reports all steps, but they are visually separated by the workflow name

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So is it possible that the no-docs workflow could finish all steps and report everything green, and then a person could merge before the real CI started to report that steps were actually failing?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tested this last week, and as long as those other builds are still going on, the required status checks are not green

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool 👍

Co-authored-by: David Boike <david.boike@gmail.com>
@danielmarbach

Copy link
Copy Markdown
Contributor Author

Merging for now. We can always make tweaks or revert

@danielmarbach
danielmarbach merged commit c934649 into master Nov 17, 2026
69 of 70 checks passed
@danielmarbach
danielmarbach deleted the ci-skip-docs-only branch November 17, 2026 07:56
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.

7 participants