Skip to content

all/docs: Run docs-lint only when documentation changes - #52

Merged
l-nmch merged 1 commit into
mainfrom
feat/docs-lint-on-doc-changes
Nov 3, 2026
Merged

l-nmch merged 1 commit into
mainfrom
feat/docs-lint-on-doc-changes

Conversation

@l-nmch

@l-nmch l-nmch commented Nov 3, 2026 •

Copy link
Copy Markdown
Member

Closes #46
Closes #27

What

docs-lint (the shared reusable workflow) now decides from the files of the pull request instead of always running the tools:

  • It checks out the merge commit with two commits of history and lists HEAD^1..HEAD.
  • Documentation is any .md file anywhere, docs/, docs-lint/, templates/docs/, scripts/check_docs.py and the docs*.yml workflows. The root CHANGELOG.md and CLAUDE.md do not count, because the Markdown check already skips them (a release-please pull request would otherwise run the full check).
  • When none changed, every step after the detection is skipped and the job docs-lint reports success in seconds. The check is still reported on every pull request, so it can stay required.
  • Not a pull request (push to main, schedule, manual run), or no merge commit to compare: the full check runs.
  • No change in the four other repositories: they call the workflow at @main with no path filter. The header comment of the workflow and the Checks section of the documentation standard now say it.

.github#27 is closed with this pull request: #46 was its last open sub-issue.

Tested

  • The detection step run on synthetic merge commits: Go file, lockfile, other workflow, CHANGELOG.md only → skip; root and nested README.md/.md, docs/ file, docs-lint/, docs.yml → full; schedule → full.
  • On this repository, with throwaway pull requests whose base was this branch (closed, not merged):
Change docs / docs-lint
A new .txt file only (#53) success in 14 s: detection ran, the second checkout, Header, Markdown, Install, Links and Prose steps were skipped
README.md (#54) success in 34 s: every step ran
This pull request (#52, changes docs-lint.yml and a docs page) success in 20 s: every step ran

Not tested here: the four other repositories call the workflow at @main, so they pick the change up after the merge (the next Renovate pull request there should skip the tools).

The reusable workflow lists the files of the pull request (merge commit against its first parent) and runs the tools only when one is documentation: any Markdown file, docs/, and the configuration of the check. Otherwise the job reports success at once, so the required check never blocks a Renovate or release-please pull request. Pushes, the schedule and manual runs always run in full. CHANGELOG.md and CLAUDE.md at the root do not count: the Markdown check skips them.
@l-nmch l-nmch added the area/ci CI/CD, automation, dependencies label Nov 3, 2026
@l-nmch l-nmch self-assigned this Nov 3, 2026
@l-nmch l-nmch added this to the 2026-Q4 milestone Nov 3, 2026
@l-nmch
l-nmch merged commit 61e2988 into main Nov 3, 2026
6 of 8 checks passed
@l-nmch
l-nmch deleted the feat/docs-lint-on-doc-changes branch November 8, 2026 15:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/ci CI/CD, automation, dependencies

Projects

None yet

Development

Successfully merging this pull request may close these issues.

all/docs: Run docs-lint only when documentation changes all/docs: Adopt one documentation standard for the operator documentation

1 participant