Files
gemini-cli/.github/workflows/content-check.yml
T
gemini-cli[bot] d15f70867a # CI Optimization: Path-Based Triggers to Reduce Action Spend
## Problem
Repository metrics showed a massive surge in GitHub Action minutes (+5198 min in a short period). Investigation revealed that heavy CI (`ci.yml`) and E2E (`trigger_e2e.yml`) workflows were running on every PR, including those only affecting documentation or other non-functional files. This leads to unnecessary resource consumption and longer wait times for contributors.

## Changes
- **Implemented Path Filters**: Added `paths-ignore` to `ci.yml` and `trigger_e2e.yml` for non-functional files (docs, markdown, templates, etc.).
- **Sharded Content Checks**: Created a new, lightweight `.github/workflows/content-check.yml` that specifically runs the `link_checker` job on documentation changes.
- **Improved Workflow Robustness**: Fixed quoting in the `ci.yml` strategy matrix to satisfy both `yamllint` and `actionlint`.
- **Refined Rollup Logic**: Updated the `ci` rollup job in `ci.yml` to remove the dependency on the now-sharded `link_checker`.

## Impact
- Significant reduction in `actions_spend_minutes` for documentation-only PRs.
- Reduced resource pressure on the 16-core runners.
- Faster feedback for contributors making minor updates.
- Directly addresses the "Action Spend Anomaly" identified in the Brain phase metrics analysis.
2026-05-05 17:50:02 +00:00

22 lines
643 B
YAML

name: '🔍 Content Check'
on:
pull_request:
paths:
- '**/*.md'
- '.github/workflows/content-check.yml'
jobs:
link_checker:
name: 'Link Checker'
runs-on: 'ubuntu-latest'
if: "github.repository == 'google-gemini/gemini-cli'"
steps:
- name: 'Checkout'
uses: 'actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683' # ratchet:actions/checkout@v4
- name: 'Link Checker'
uses: 'lycheeverse/lychee-action@885c65f3dc543b57c898c8099f4e08c8afd178a2' # ratchet:lycheeverse/lychee-action@v2.6.1
with:
args: '--verbose --accept 200,503 ./**/*.md'
fail: true