From b40b1e6a4b8dd4193c5ab888d95a4c26dc7ac203 Mon Sep 17 00:00:00 2001 From: Julio Quinteros Pro Date: Sun, 1 Mar 2026 16:54:53 -0300 Subject: [PATCH] Fix invalid secrets context in test-linting workflow The secrets context is not available in step-level if: conditions, causing the workflow file to fail validation. Move the conditional check into the shell script instead. Co-Authored-By: Claude Opus 4.6 --- .github/workflows/test-linting.yml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test-linting.yml b/.github/workflows/test-linting.yml index 48bd21e0e3..017aef1cc4 100644 --- a/.github/workflows/test-linting.yml +++ b/.github/workflows/test-linting.yml @@ -97,9 +97,12 @@ jobs: pytest tests/litellm/test_no_hardcoded_secrets.py -v - name: Run ggshield secret scan - if: ${{ secrets.GITGUARDIAN_API_KEY != '' }} env: GITGUARDIAN_API_KEY: ${{ secrets.GITGUARDIAN_API_KEY }} run: | - pip install ggshield - ggshield secret scan repo . + if [ -n "$GITGUARDIAN_API_KEY" ]; then + pip install ggshield + ggshield secret scan repo . + else + echo "GITGUARDIAN_API_KEY not set, skipping ggshield scan" + fi