From 91bc095e18e8fce767bb9dd0fb80f777f166f48a Mon Sep 17 00:00:00 2001 From: DmitriyAlergant Date: Mon, 23 Mar 2026 21:29:00 -0400 Subject: [PATCH 1/2] ci: skip scheduled workflows on forks Add `if: github.repository == 'BerriAI/litellm'` guard to scheduled jobs in stale.yml, codeql.yml, and create_daily_staging_branch.yml. This matches the existing pattern in auto_update_price_and_context_window.yml and prevents these workflows from running unnecessarily on fork repositories. --- .github/workflows/codeql.yml | 1 + .github/workflows/create_daily_staging_branch.yml | 2 ++ .github/workflows/stale.yml | 1 + 3 files changed, 4 insertions(+) diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index 0b7cce2e4be..4e45b7fbe6f 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -15,6 +15,7 @@ concurrency: jobs: analyze: + if: github.repository == 'BerriAI/litellm' name: Analyze (${{ matrix.language }}) runs-on: ubuntu-latest timeout-minutes: 30 diff --git a/.github/workflows/create_daily_staging_branch.yml b/.github/workflows/create_daily_staging_branch.yml index 08aebd7d04c..ec27aaad8ac 100644 --- a/.github/workflows/create_daily_staging_branch.yml +++ b/.github/workflows/create_daily_staging_branch.yml @@ -7,6 +7,7 @@ on: jobs: create-staging-branch: + if: github.repository == 'BerriAI/litellm' runs-on: ubuntu-latest steps: @@ -43,6 +44,7 @@ jobs: fi create-internal-dev-branch: + if: github.repository == 'BerriAI/litellm' runs-on: ubuntu-latest steps: diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml index 5a9b19fc9ca..4945655b614 100644 --- a/.github/workflows/stale.yml +++ b/.github/workflows/stale.yml @@ -7,6 +7,7 @@ on: jobs: stale: + if: github.repository == 'BerriAI/litellm' runs-on: ubuntu-latest steps: - uses: actions/stale@v8 From 1310a275d2d20d938e41bd176225370bc66adb77 Mon Sep 17 00:00:00 2001 From: DmitriyAlergant Date: Mon, 23 Mar 2026 21:39:11 -0400 Subject: [PATCH 2/2] ci: narrow codeql guard to schedule-only MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Use event_name check so push/PR-triggered CodeQL scans still run on forks — only the scheduled run is skipped. --- .github/workflows/codeql.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index 4e45b7fbe6f..91b88b66a1f 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -15,7 +15,7 @@ concurrency: jobs: analyze: - if: github.repository == 'BerriAI/litellm' + if: github.event_name != 'schedule' || github.repository == 'BerriAI/litellm' name: Analyze (${{ matrix.language }}) runs-on: ubuntu-latest timeout-minutes: 30