Skip to content

ci: report required check contexts on docs-only changes#21

Open
ak2k wants to merge 1 commit into
mainfrom
ci/docs-only-pass-required-checks
Open

ci: report required check contexts on docs-only changes#21
ak2k wants to merge 1 commit into
mainfrom
ci/docs-only-pass-required-checks

Conversation

@ak2k

@ak2k ak2k commented May 27, 2026

Copy link
Copy Markdown
Owner

Problem

check.yml is path-filtered to code files (**.nix, flake.lock, .github/workflows/**, pyproject.toml, *.py), so a docs-only PR never triggers it. But branch protection on main requires check (ubuntu-latest) / check (ubuntu-24.04-arm) / check (macos-14), and required checks that never report leave the PR permanently BLOCKED. With enforce_admins: true, not even an admin can bypass — #20 (a README change) only landed via a temporary enforce_admins toggle.

Fix

Drop the trigger path filter; gate the expensive build behind a changes job (dorny/paths-filter). The check (<os>) matrix now always runs and always reports its contexts:

  • code changed → real nix flake check -L
  • docs-only → instant pass

Branch protection is untouched — same context names, enforce_admins/strict stay on. Docs PRs become mergeable, including via auto-merge (already enabled on the repo).

Why gate in one workflow vs. a second no-op workflow

A separate no-op workflow on paths-ignore would report green instantly on a mixed code+docs PR while the real build is still running — a window where a broken build could be merged. Single-workflow gating yields exactly one authoritative result per context.

Self-validating

This PR touches .github/workflows/**code=true ⇒ the real nix flake check runs on it ⇒ merges through the normal green path, no admin bypass.

dorny/paths-filter@v3 is the one new third-party action (tag-pinned to match repo convention; happy to pin to a SHA if preferred).

The check workflow was path-filtered to code files (**.nix, flake.lock,
workflows, pyproject.toml, *.py), so docs-only PRs never triggered it.
Branch protection requires the three check (<os>) contexts, so those PRs
were permanently BLOCKED — only an admin enforce_admins toggle could land
a README change.

Drop the path filter and gate the expensive build behind a changes job
(dorny/paths-filter). The check (<os>) matrix now always runs and always
reports its contexts: real nix flake check when code changed, an instant
pass when the change is docs-only. Branch protection is unchanged (same
context names, enforce_admins/strict stay on), and docs PRs become
mergeable — including via auto-merge, which is already enabled on the repo.

Gating in one workflow (rather than a second no-op workflow on
paths-ignore) avoids a masking window on mixed code+docs PRs, where an
instant green could let a still-running real build be merged.
@ak2k ak2k enabled auto-merge (squash) May 28, 2026 13:51
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