Skip to content

ci: skip checks for docs-only pull requests - #34

Merged
SomeoneWithOptions merged 1 commit into
mainfrom
ci-trigger
Oct 22, 2026
Merged

SomeoneWithOptions merged 1 commit into
mainfrom
ci-trigger

Conversation

@SomeoneWithOptions

Copy link
Copy Markdown
Owner

What / why

PRs that touch only prose (README, AGENTS, release notes, templates) ran the full 3-OS Go matrix and the install-script checks. Nothing those jobs test had changed.

Changes

  • New changes job diffs the PR merge commit against its base (HEAD^1) and sorts each file:
    • Skip: *.md, LICENSE, .github/CODEOWNERS, .github/ISSUE_TEMPLATE/*
    • Go checks: cmd/, internal/, test/, docs/, plus any file not in the skip list (go.mod, Makefile, release.yml, …)
    • Install-script checks: install.sh, install.ps1
    • Both: ci.yml
  • check matrix: every step is gated on changes. The job itself always starts.
  • install scripts: skipped as a whole job when scripts didn't change.
  • workflow_call (release) always runs everything.

Verification

  • YAML parses.

  • Ran the file-sorting case locally on 8 sample file lists: docs-only and release-notes-only skip, docs/*.md runs, Go changes run, install.sh runs only scripts, go.mod/Makefile/release.yml run, ci.yml runs both.

  • This PR changes ci.yml, so it should run everything. Still need a docs-only PR to confirm the skip on GitHub.

  • make check passes locally (workflow-only change, not run)

  • make docs run if CLI help changed (n/a)

  • No secrets/keys/tokens in diff or logs

  • No v* tag or release commit in this PR

Notes for reviewer

  • No on.pull_request.paths: the main-protection ruleset requires check (<os>) ×3 and install scripts by name. If the workflow never starts, those checks stay pending forever.
  • The matrix job always starts and only its steps are skipped. A skipped matrix job doesn't expand its matrix, so the per-OS check names would never be reported. On docs-only PRs this costs a few seconds of runner start-up per OS (free on a public repo).
  • If changes fails, everything runs: jobs use !cancelled() and check != 'false', so an empty output still runs the checks.
  • docs/ still runs the Go checks on purpose. Those files are generated, and TestDocsAreCurrent fails on hand edits.
  • All action pins are already at their latest versions (checkout v7.0.1, setup-go v7.0.0, action-gh-release v3.0.3).

🤖 Generated with Claude Code

@SomeoneWithOptions
SomeoneWithOptions merged commit 683585a into main Oct 22, 2026
5 checks passed
@SomeoneWithOptions
SomeoneWithOptions deleted the ci-trigger branch October 22, 2026 12:09
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