Disable expensive and scheduled workflows on personal forks (#20449)

This commit is contained in:
DeWitt Clinton
2026-02-27 09:40:09 -08:00
committed by GitHub
parent 59c0e73718
commit 7a1f2f3288
17 changed files with 42 additions and 23 deletions
+12 -11
View File
@@ -31,6 +31,7 @@ jobs:
name: 'Merge Queue Skipper' name: 'Merge Queue Skipper'
permissions: 'read-all' permissions: 'read-all'
runs-on: 'gemini-cli-ubuntu-16-core' runs-on: 'gemini-cli-ubuntu-16-core'
if: "github.repository == 'google-gemini/gemini-cli'"
outputs: outputs:
skip: '${{ steps.merge-queue-e2e-skipper.outputs.skip-check }}' skip: '${{ steps.merge-queue-e2e-skipper.outputs.skip-check }}'
steps: steps:
@@ -42,7 +43,7 @@ jobs:
download_repo_name: download_repo_name:
runs-on: 'gemini-cli-ubuntu-16-core' runs-on: 'gemini-cli-ubuntu-16-core'
if: "${{github.event_name == 'workflow_dispatch' || github.event_name == 'workflow_run'}}" if: "github.repository == 'google-gemini/gemini-cli' && (github.event_name == 'workflow_dispatch' || github.event_name == 'workflow_run')"
outputs: outputs:
repo_name: '${{ steps.output-repo-name.outputs.repo_name }}' repo_name: '${{ steps.output-repo-name.outputs.repo_name }}'
head_sha: '${{ steps.output-repo-name.outputs.head_sha }}' head_sha: '${{ steps.output-repo-name.outputs.head_sha }}'
@@ -91,7 +92,7 @@ jobs:
name: 'Parse run context' name: 'Parse run context'
runs-on: 'gemini-cli-ubuntu-16-core' runs-on: 'gemini-cli-ubuntu-16-core'
needs: 'download_repo_name' needs: 'download_repo_name'
if: 'always()' if: "github.repository == 'google-gemini/gemini-cli' && always()"
outputs: outputs:
repository: '${{ steps.set_context.outputs.REPO }}' repository: '${{ steps.set_context.outputs.REPO }}'
sha: '${{ steps.set_context.outputs.SHA }}' sha: '${{ steps.set_context.outputs.SHA }}'
@@ -111,11 +112,11 @@ jobs:
permissions: 'write-all' permissions: 'write-all'
needs: needs:
- 'parse_run_context' - 'parse_run_context'
if: 'always()' if: "github.repository == 'google-gemini/gemini-cli' && always()"
steps: steps:
- name: 'Set pending status' - name: 'Set pending status'
uses: 'myrotvorets/set-commit-status-action@16037e056d73b2d3c88e37e393ff369047f70886' # ratchet:myrotvorets/set-commit-status-action@master uses: 'myrotvorets/set-commit-status-action@16037e056d73b2d3c88e37e393ff369047f70886' # ratchet:myrotvorets/set-commit-status-action@master
if: 'always()' if: "github.repository == 'google-gemini/gemini-cli' && always()"
with: with:
allowForks: 'true' allowForks: 'true'
repo: '${{ github.repository }}' repo: '${{ github.repository }}'
@@ -131,7 +132,7 @@ jobs:
- 'parse_run_context' - 'parse_run_context'
runs-on: 'gemini-cli-ubuntu-16-core' runs-on: 'gemini-cli-ubuntu-16-core'
if: | if: |
always() && (needs.merge_queue_skipper.result !='success' || needs.merge_queue_skipper.outputs.skip != 'true') github.repository == 'google-gemini/gemini-cli' && always() && (needs.merge_queue_skipper.result !='success' || needs.merge_queue_skipper.outputs.skip != 'true')
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:
@@ -184,7 +185,7 @@ jobs:
- 'parse_run_context' - 'parse_run_context'
runs-on: 'macos-latest' runs-on: 'macos-latest'
if: | if: |
always() && (needs.merge_queue_skipper.result !='success' || needs.merge_queue_skipper.outputs.skip != 'true') github.repository == 'google-gemini/gemini-cli' && always() && (needs.merge_queue_skipper.result !='success' || needs.merge_queue_skipper.outputs.skip != 'true')
steps: steps:
- name: 'Checkout' - name: 'Checkout'
uses: 'actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955' # ratchet:actions/checkout@v5 uses: 'actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955' # ratchet:actions/checkout@v5
@@ -222,7 +223,7 @@ jobs:
- 'merge_queue_skipper' - 'merge_queue_skipper'
- 'parse_run_context' - 'parse_run_context'
if: | if: |
always() && (needs.merge_queue_skipper.result !='success' || needs.merge_queue_skipper.outputs.skip != 'true') github.repository == 'google-gemini/gemini-cli' && always() && (needs.merge_queue_skipper.result !='success' || needs.merge_queue_skipper.outputs.skip != 'true')
runs-on: 'gemini-cli-windows-16-core' runs-on: 'gemini-cli-windows-16-core'
steps: steps:
- name: 'Checkout' - name: 'Checkout'
@@ -282,7 +283,7 @@ jobs:
- 'parse_run_context' - 'parse_run_context'
runs-on: 'gemini-cli-ubuntu-16-core' runs-on: 'gemini-cli-ubuntu-16-core'
if: | if: |
always() && (needs.merge_queue_skipper.result !='success' || needs.merge_queue_skipper.outputs.skip != 'true') github.repository == 'google-gemini/gemini-cli' && always() && (needs.merge_queue_skipper.result !='success' || needs.merge_queue_skipper.outputs.skip != 'true')
steps: steps:
- name: 'Checkout' - name: 'Checkout'
uses: 'actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955' # ratchet:actions/checkout@v5 uses: 'actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955' # ratchet:actions/checkout@v5
@@ -309,7 +310,7 @@ jobs:
e2e: e2e:
name: 'E2E' name: 'E2E'
if: | if: |
always() && (needs.merge_queue_skipper.result !='success' || needs.merge_queue_skipper.outputs.skip != 'true') github.repository == 'google-gemini/gemini-cli' && always() && (needs.merge_queue_skipper.result !='success' || needs.merge_queue_skipper.outputs.skip != 'true')
needs: needs:
- 'e2e_linux' - 'e2e_linux'
- 'e2e_mac' - 'e2e_mac'
@@ -337,14 +338,14 @@ jobs:
set_workflow_status: set_workflow_status:
runs-on: 'gemini-cli-ubuntu-16-core' runs-on: 'gemini-cli-ubuntu-16-core'
permissions: 'write-all' permissions: 'write-all'
if: 'always()' if: "github.repository == 'google-gemini/gemini-cli' && always()"
needs: needs:
- 'parse_run_context' - 'parse_run_context'
- 'e2e' - 'e2e'
steps: steps:
- name: 'Set workflow status' - name: 'Set workflow status'
uses: 'myrotvorets/set-commit-status-action@16037e056d73b2d3c88e37e393ff369047f70886' # ratchet:myrotvorets/set-commit-status-action@master uses: 'myrotvorets/set-commit-status-action@16037e056d73b2d3c88e37e393ff369047f70886' # ratchet:myrotvorets/set-commit-status-action@master
if: 'always()' if: "github.repository == 'google-gemini/gemini-cli' && always()"
with: with:
allowForks: 'true' allowForks: 'true'
repo: '${{ github.repository }}' repo: '${{ github.repository }}'
+9 -7
View File
@@ -37,6 +37,7 @@ jobs:
permissions: 'read-all' permissions: 'read-all'
name: 'Merge Queue Skipper' name: 'Merge Queue Skipper'
runs-on: 'gemini-cli-ubuntu-16-core' runs-on: 'gemini-cli-ubuntu-16-core'
if: "github.repository == 'google-gemini/gemini-cli'"
outputs: outputs:
skip: '${{ steps.merge-queue-ci-skipper.outputs.skip-check }}' skip: '${{ steps.merge-queue-ci-skipper.outputs.skip-check }}'
steps: steps:
@@ -49,7 +50,7 @@ jobs:
name: 'Lint' name: 'Lint'
runs-on: 'gemini-cli-ubuntu-16-core' runs-on: 'gemini-cli-ubuntu-16-core'
needs: 'merge_queue_skipper' needs: 'merge_queue_skipper'
if: "${{needs.merge_queue_skipper.outputs.skip == 'false'}}" if: "github.repository == 'google-gemini/gemini-cli' && needs.merge_queue_skipper.outputs.skip == 'false'"
env: env:
GEMINI_LINT_TEMP_DIR: '${{ github.workspace }}/.gemini-linters' GEMINI_LINT_TEMP_DIR: '${{ github.workspace }}/.gemini-linters'
steps: steps:
@@ -116,6 +117,7 @@ jobs:
link_checker: link_checker:
name: 'Link Checker' name: 'Link Checker'
runs-on: 'ubuntu-latest' runs-on: 'ubuntu-latest'
if: "github.repository == 'google-gemini/gemini-cli'"
steps: steps:
- name: 'Checkout' - name: 'Checkout'
uses: 'actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8' # ratchet:actions/checkout@v5 uses: 'actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8' # ratchet:actions/checkout@v5
@@ -129,7 +131,7 @@ jobs:
runs-on: 'gemini-cli-ubuntu-16-core' runs-on: 'gemini-cli-ubuntu-16-core'
needs: needs:
- 'merge_queue_skipper' - 'merge_queue_skipper'
if: "${{needs.merge_queue_skipper.outputs.skip == 'false'}}" if: "github.repository == 'google-gemini/gemini-cli' && needs.merge_queue_skipper.outputs.skip == 'false'"
permissions: permissions:
contents: 'read' contents: 'read'
checks: 'write' checks: 'write'
@@ -216,7 +218,7 @@ jobs:
runs-on: 'macos-latest' runs-on: 'macos-latest'
needs: needs:
- 'merge_queue_skipper' - 'merge_queue_skipper'
if: "${{needs.merge_queue_skipper.outputs.skip == 'false'}}" if: "github.repository == 'google-gemini/gemini-cli' && needs.merge_queue_skipper.outputs.skip == 'false'"
permissions: permissions:
contents: 'read' contents: 'read'
checks: 'write' checks: 'write'
@@ -311,7 +313,7 @@ jobs:
name: 'CodeQL' name: 'CodeQL'
runs-on: 'gemini-cli-ubuntu-16-core' runs-on: 'gemini-cli-ubuntu-16-core'
needs: 'merge_queue_skipper' needs: 'merge_queue_skipper'
if: "${{needs.merge_queue_skipper.outputs.skip == 'false'}}" if: "github.repository == 'google-gemini/gemini-cli' && needs.merge_queue_skipper.outputs.skip == 'false'"
permissions: permissions:
actions: 'read' actions: 'read'
contents: 'read' contents: 'read'
@@ -334,7 +336,7 @@ jobs:
bundle_size: bundle_size:
name: 'Check Bundle Size' name: 'Check Bundle Size'
needs: 'merge_queue_skipper' needs: 'merge_queue_skipper'
if: "${{github.event_name == 'pull_request' && needs.merge_queue_skipper.outputs.skip == 'false'}}" if: "github.repository == 'google-gemini/gemini-cli' && github.event_name == 'pull_request' && needs.merge_queue_skipper.outputs.skip == 'false'"
runs-on: 'gemini-cli-ubuntu-16-core' runs-on: 'gemini-cli-ubuntu-16-core'
permissions: permissions:
contents: 'read' # For checkout contents: 'read' # For checkout
@@ -359,7 +361,7 @@ jobs:
name: 'Slow Test - Win - ${{ matrix.shard }}' name: 'Slow Test - Win - ${{ matrix.shard }}'
runs-on: 'gemini-cli-windows-16-core' runs-on: 'gemini-cli-windows-16-core'
needs: 'merge_queue_skipper' needs: 'merge_queue_skipper'
if: "${{needs.merge_queue_skipper.outputs.skip == 'false'}}" if: "github.repository == 'google-gemini/gemini-cli' && needs.merge_queue_skipper.outputs.skip == 'false'"
timeout-minutes: 60 timeout-minutes: 60
strategy: strategy:
matrix: matrix:
@@ -451,7 +453,7 @@ jobs:
ci: ci:
name: 'CI' name: 'CI'
if: 'always()' if: "github.repository == 'google-gemini/gemini-cli' && always()"
needs: needs:
- 'lint' - 'lint'
- 'link_checker' - 'link_checker'
+3
View File
@@ -27,6 +27,7 @@ jobs:
deflake_e2e_linux: deflake_e2e_linux:
name: 'E2E Test (Linux) - ${{ matrix.sandbox }}' name: 'E2E Test (Linux) - ${{ matrix.sandbox }}'
runs-on: 'gemini-cli-ubuntu-16-core' runs-on: 'gemini-cli-ubuntu-16-core'
if: "github.repository == 'google-gemini/gemini-cli'"
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:
@@ -77,6 +78,7 @@ jobs:
deflake_e2e_mac: deflake_e2e_mac:
name: 'E2E Test (macOS)' name: 'E2E Test (macOS)'
runs-on: 'macos-latest' runs-on: 'macos-latest'
if: "github.repository == 'google-gemini/gemini-cli'"
steps: steps:
- name: 'Checkout' - name: 'Checkout'
uses: 'actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955' # ratchet:actions/checkout@v5 uses: 'actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955' # ratchet:actions/checkout@v5
@@ -114,6 +116,7 @@ jobs:
deflake_e2e_windows: deflake_e2e_windows:
name: 'Slow E2E - Win' name: 'Slow E2E - Win'
runs-on: 'gemini-cli-windows-16-core' runs-on: 'gemini-cli-windows-16-core'
if: "github.repository == 'google-gemini/gemini-cli'"
steps: steps:
- name: 'Checkout' - name: 'Checkout'
+2 -2
View File
@@ -19,8 +19,7 @@ concurrency:
jobs: jobs:
build: build:
if: |- if: "github.repository == 'google-gemini/gemini-cli' && !contains(github.ref_name, 'nightly')"
${{ !contains(github.ref_name, 'nightly') }}
runs-on: 'ubuntu-latest' runs-on: 'ubuntu-latest'
steps: steps:
- name: 'Checkout' - name: 'Checkout'
@@ -39,6 +38,7 @@ jobs:
uses: 'actions/upload-pages-artifact@56afc609e74202658d3ffba0e8f6dda462b719fa' # ratchet:actions/upload-pages-artifact@v3 uses: 'actions/upload-pages-artifact@56afc609e74202658d3ffba0e8f6dda462b719fa' # ratchet:actions/upload-pages-artifact@v3
deploy: deploy:
if: "github.repository == 'google-gemini/gemini-cli'"
environment: environment:
name: 'github-pages' name: 'github-pages'
url: '${{ steps.deployment.outputs.page_url }}' url: '${{ steps.deployment.outputs.page_url }}'
+1
View File
@@ -7,6 +7,7 @@ on:
- 'docs/**' - 'docs/**'
jobs: jobs:
trigger-rebuild: trigger-rebuild:
if: "github.repository == 'google-gemini/gemini-cli'"
runs-on: 'ubuntu-latest' runs-on: 'ubuntu-latest'
steps: steps:
- name: 'Trigger rebuild' - name: 'Trigger rebuild'
+2 -1
View File
@@ -23,6 +23,7 @@ jobs:
evals: evals:
name: 'Evals (USUALLY_PASSING) nightly run' name: 'Evals (USUALLY_PASSING) nightly run'
runs-on: 'gemini-cli-ubuntu-16-core' runs-on: 'gemini-cli-ubuntu-16-core'
if: "github.repository == 'google-gemini/gemini-cli'"
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:
@@ -85,7 +86,7 @@ jobs:
aggregate-results: aggregate-results:
name: 'Aggregate Results' name: 'Aggregate Results'
needs: ['evals'] needs: ['evals']
if: 'always()' if: "github.repository == 'google-gemini/gemini-cli' && always()"
runs-on: 'gemini-cli-ubuntu-16-core' runs-on: 'gemini-cli-ubuntu-16-core'
steps: steps:
- name: 'Checkout' - name: 'Checkout'
@@ -21,6 +21,7 @@ defaults:
jobs: jobs:
close-stale-issues: close-stale-issues:
if: "github.repository == 'google-gemini/gemini-cli'"
runs-on: 'ubuntu-latest' runs-on: 'ubuntu-latest'
permissions: permissions:
issues: 'write' issues: 'write'
@@ -14,7 +14,7 @@ permissions:
jobs: jobs:
# Event-based: Quick reaction to new/edited issues in THIS repo # Event-based: Quick reaction to new/edited issues in THIS repo
labeler: labeler:
if: "github.event_name == 'issues'" if: "github.repository == 'google-gemini/gemini-cli' && github.event_name == 'issues'"
runs-on: 'ubuntu-latest' runs-on: 'ubuntu-latest'
steps: steps:
- name: 'Checkout' - name: 'Checkout'
@@ -36,7 +36,7 @@ jobs:
# Scheduled/Manual: Recursive sync across multiple repos # Scheduled/Manual: Recursive sync across multiple repos
sync-maintainer-labels: sync-maintainer-labels:
if: "github.event_name == 'schedule' || github.event_name == 'workflow_dispatch'" if: "github.repository == 'google-gemini/gemini-cli' && (github.event_name == 'schedule' || github.event_name == 'workflow_dispatch')"
runs-on: 'ubuntu-latest' runs-on: 'ubuntu-latest'
steps: steps:
- name: 'Checkout' - name: 'Checkout'
@@ -9,6 +9,7 @@ on:
jobs: jobs:
labeler: labeler:
if: "github.repository == 'google-gemini/gemini-cli'"
runs-on: 'ubuntu-latest' runs-on: 'ubuntu-latest'
permissions: permissions:
issues: 'write' issues: 'write'
@@ -32,6 +32,7 @@ on:
jobs: jobs:
change-tags: change-tags:
if: "github.repository == 'google-gemini/gemini-cli'"
runs-on: 'ubuntu-latest' runs-on: 'ubuntu-latest'
environment: "${{ github.event.inputs.environment || 'prod' }}" environment: "${{ github.event.inputs.environment || 'prod' }}"
permissions: permissions:
+1
View File
@@ -47,6 +47,7 @@ on:
jobs: jobs:
release: release:
if: "github.repository == 'google-gemini/gemini-cli'"
runs-on: 'ubuntu-latest' runs-on: 'ubuntu-latest'
environment: "${{ github.event.inputs.environment || 'prod' }}" environment: "${{ github.event.inputs.environment || 'prod' }}"
permissions: permissions:
+1
View File
@@ -22,6 +22,7 @@ on:
jobs: jobs:
generate-release-notes: generate-release-notes:
if: "github.repository == 'google-gemini/gemini-cli'"
runs-on: 'ubuntu-latest' runs-on: 'ubuntu-latest'
permissions: permissions:
contents: 'write' contents: 'write'
+1
View File
@@ -42,6 +42,7 @@ on:
jobs: jobs:
change-tags: change-tags:
if: "github.repository == 'google-gemini/gemini-cli'"
environment: "${{ github.event.inputs.environment || 'prod' }}" environment: "${{ github.event.inputs.environment || 'prod' }}"
runs-on: 'ubuntu-latest' runs-on: 'ubuntu-latest'
permissions: permissions:
+1
View File
@@ -16,6 +16,7 @@ on:
jobs: jobs:
build: build:
if: "github.repository == 'google-gemini/gemini-cli'"
runs-on: 'ubuntu-latest' runs-on: 'ubuntu-latest'
permissions: permissions:
contents: 'read' contents: 'read'
+1
View File
@@ -20,6 +20,7 @@ on:
jobs: jobs:
smoke-test: smoke-test:
if: "github.repository == 'google-gemini/gemini-cli'"
runs-on: 'ubuntu-latest' runs-on: 'ubuntu-latest'
permissions: permissions:
contents: 'write' contents: 'write'
+2
View File
@@ -15,6 +15,7 @@ on:
jobs: jobs:
save_repo_name: save_repo_name:
if: "github.repository == 'google-gemini/gemini-cli'"
runs-on: 'gemini-cli-ubuntu-16-core' runs-on: 'gemini-cli-ubuntu-16-core'
steps: steps:
- name: 'Save Repo name' - name: 'Save Repo name'
@@ -31,6 +32,7 @@ jobs:
path: 'pr/' path: 'pr/'
trigger_e2e: trigger_e2e:
name: 'Trigger e2e' name: 'Trigger e2e'
if: "github.repository == 'google-gemini/gemini-cli'"
runs-on: 'gemini-cli-ubuntu-16-core' runs-on: 'gemini-cli-ubuntu-16-core'
steps: steps:
- id: 'trigger-e2e' - id: 'trigger-e2e'
+1
View File
@@ -28,6 +28,7 @@ on:
jobs: jobs:
verify-release: verify-release:
if: "github.repository == 'google-gemini/gemini-cli'"
environment: "${{ github.event.inputs.environment || 'prod' }}" environment: "${{ github.event.inputs.environment || 'prod' }}"
strategy: strategy:
fail-fast: false fail-fast: false