From 2642ce61ed76afc5688f577db91318a53464c335 Mon Sep 17 00:00:00 2001 From: Hai Huang Date: Fri, 30 Oct 2026 10:48:06 -0400 Subject: [PATCH 1/3] CI: Skip the heavy workflows on docs-only PRs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add paths-ignore: "**.md" to ci.yaml, build.yaml and security-scans.yaml pull_request triggers, so a markdown-only PR skips the Go matrix, image builds and CodeQL/Trivy. Spellcheck stays unfiltered — it is the one workflow a docs PR needs. No required status checks exist today, so a filtered-out run cannot block a merge. Assisted-By: Claude (Anthropic AI) Signed-off-by: Hai Huang --- .github/workflows/build.yaml | 5 +++++ .github/workflows/ci.yaml | 5 +++++ .github/workflows/security-scans.yaml | 5 +++++ 3 files changed, 15 insertions(+) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 47a9f6757..f154c8e2c 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -12,6 +12,11 @@ on: pull_request: branches: - main + # Markdown cannot break a Dockerfile; docs-only PRs skip image builds. + # Footgun: a filtered-out run reports "Expected" forever if this workflow is + # ever added to branch protection as a required check. + paths-ignore: + - "**.md" # Allow manual trigger workflow_dispatch: diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index d791dcc14..81dfdf466 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -10,6 +10,11 @@ on: branches: - main - "release-*" + # Markdown cannot break a build; docs-only PRs skip the Go matrix entirely. + # Footgun: a filtered-out run reports "Expected" forever if this workflow is + # ever added to branch protection as a required check. + paths-ignore: + - "**.md" push: branches: - main diff --git a/.github/workflows/security-scans.yaml b/.github/workflows/security-scans.yaml index 5d9ef8c13..70bc37f24 100644 --- a/.github/workflows/security-scans.yaml +++ b/.github/workflows/security-scans.yaml @@ -15,6 +15,11 @@ name: Security Scans on: pull_request: branches: [main] + # Markdown cannot trip CodeQL, Trivy or Hadolint; docs-only PRs skip them. + # Footgun: a filtered-out run reports "Expected" forever if this workflow is + # ever added to branch protection as a required check. + paths-ignore: + - "**.md" permissions: {} From 27764b86826f8df0f03db209211f70484f68e1dd Mon Sep 17 00:00:00 2001 From: Hai Huang Date: Fri, 30 Oct 2026 10:51:31 -0400 Subject: [PATCH 2/3] CI: Keep pre-commit running on docs-only PRs Fixes review: the markdown whitespace hooks left CI when ci.yaml gained paths-ignore, and the spellcheck job is disabled (if: false), so a docs PR would run no markdown check at all. Files: .github/workflows/spellcheck_action.yml Assisted-By: Claude (Anthropic AI) Signed-off-by: Hai Huang --- .github/workflows/spellcheck_action.yml | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/.github/workflows/spellcheck_action.yml b/.github/workflows/spellcheck_action.yml index 74458ac0d..f9323a371 100644 --- a/.github/workflows/spellcheck_action.yml +++ b/.github/workflows/spellcheck_action.yml @@ -12,6 +12,26 @@ permissions: contents: read jobs: + pre-commit: + # ci.yaml skips docs-only PRs (paths-ignore: "**.md"), which used to be the + # only place these hooks ran in CI. This job restores them: pre-commit runs + # against changed files only, so on a docs PR it is just the markdown + # whitespace and merge-conflict hooks — a minute of runner, not the Go matrix. + name: Pre-commit (docs PRs) + runs-on: ubuntu-latest + timeout-minutes: 10 + steps: + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + + - uses: actions/setup-python@6d4fd22b20465ccc0f7354476588e8df7c9ca0e0 # v7.1.0 + with: + python-version: '3.12' + + - name: Run pre-commit + uses: pre-commit/action@2c7b3805fd2a0fd8c1884dcaebf91fc102a13ecd # v3.0.1 + env: + SKIP: ai-assisted-by-trailer + spellcheck: # disable spell check with 'false' value. if: false From 60baf1e7902fd3e6dfd4f3bbaaa45a567c2a0c6e Mon Sep 17 00:00:00 2001 From: Hai Huang Date: Fri, 30 Oct 2026 11:02:48 -0400 Subject: [PATCH 3/3] CI: Drop the ci.yaml docs filter and the spellcheck pre-commit job Fixes review: ci.yaml's paths-ignore let docs-only PRs skip the doc-drift tests that read .md files; the spellcheck pre-commit job duplicated the pre-commit job ci.yaml already runs on every PR. Files: .github/workflows/build.yaml, .github/workflows/ci.yaml, .github/workflows/spellcheck_action.yml Assisted-By: Claude (Anthropic AI) Signed-off-by: Hai Huang --- .github/workflows/build.yaml | 5 ++++- .github/workflows/ci.yaml | 5 ----- .github/workflows/spellcheck_action.yml | 20 -------------------- 3 files changed, 4 insertions(+), 26 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index f154c8e2c..22fb20e93 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -12,7 +12,10 @@ on: pull_request: branches: - main - # Markdown cannot break a Dockerfile; docs-only PRs skip image builds. + # Docs edits can't break an image build, so docs-only PRs skip it. One edge: + # deploy/sparc-service/Dockerfile COPYs that dir's README (pyproject metadata), + # so deleting it is a docs-only change that fails the build — caught by the + # push run on main, not the PR. # Footgun: a filtered-out run reports "Expected" forever if this workflow is # ever added to branch protection as a required check. paths-ignore: diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 81dfdf466..d791dcc14 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -10,11 +10,6 @@ on: branches: - main - "release-*" - # Markdown cannot break a build; docs-only PRs skip the Go matrix entirely. - # Footgun: a filtered-out run reports "Expected" forever if this workflow is - # ever added to branch protection as a required check. - paths-ignore: - - "**.md" push: branches: - main diff --git a/.github/workflows/spellcheck_action.yml b/.github/workflows/spellcheck_action.yml index f9323a371..74458ac0d 100644 --- a/.github/workflows/spellcheck_action.yml +++ b/.github/workflows/spellcheck_action.yml @@ -12,26 +12,6 @@ permissions: contents: read jobs: - pre-commit: - # ci.yaml skips docs-only PRs (paths-ignore: "**.md"), which used to be the - # only place these hooks ran in CI. This job restores them: pre-commit runs - # against changed files only, so on a docs PR it is just the markdown - # whitespace and merge-conflict hooks — a minute of runner, not the Go matrix. - name: Pre-commit (docs PRs) - runs-on: ubuntu-latest - timeout-minutes: 10 - steps: - - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - - - uses: actions/setup-python@6d4fd22b20465ccc0f7354476588e8df7c9ca0e0 # v7.1.0 - with: - python-version: '3.12' - - - name: Run pre-commit - uses: pre-commit/action@2c7b3805fd2a0fd8c1884dcaebf91fc102a13ecd # v3.0.1 - env: - SKIP: ai-assisted-by-trailer - spellcheck: # disable spell check with 'false' value. if: false