Files
gemini-cli/.github/workflows/trigger_e2e.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

52 lines
1.5 KiB
YAML

name: 'Trigger E2E'
on:
workflow_dispatch:
inputs:
repo_name:
description: 'Repository name (e.g., owner/repo)'
required: false
type: 'string'
head_sha:
description: 'SHA of the commit to test'
required: false
type: 'string'
pull_request:
paths-ignore:
- 'docs/**'
- '**/*.md'
- '.github/ISSUE_TEMPLATE/**'
- '.github/pull_request_template.md'
- '.gitignore'
- '.editorconfig'
- 'LICENSE'
- 'CONTRIBUTING.md'
- 'ROADMAP.md'
- 'SECURITY.md'
jobs:
save_repo_name:
if: "github.repository == 'google-gemini/gemini-cli'"
runs-on: 'gemini-cli-ubuntu-16-core'
steps:
- name: 'Save Repo name'
env:
REPO_NAME: '${{ github.event.inputs.repo_name || github.event.pull_request.head.repo.full_name }}'
HEAD_SHA: '${{ github.event.inputs.head_sha || github.event.pull_request.head.sha }}'
run: |
mkdir -p ./pr
echo "${REPO_NAME}" > ./pr/repo_name
echo "${HEAD_SHA}" > ./pr/head_sha
- uses: 'actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02' # ratchet:actions/upload-artifact@v4
with:
name: 'repo_name'
path: 'pr/'
trigger_e2e:
name: 'Trigger e2e'
if: "github.repository == 'google-gemini/gemini-cli'"
runs-on: 'gemini-cli-ubuntu-16-core'
steps:
- id: 'trigger-e2e'
run: |
echo "Trigger e2e workflow"