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 <noreply@anthropic.com>
This commit is contained in:
parent
ac6e1d9fd1
commit
b40b1e6a4b
9
.github/workflows/test-linting.yml
vendored
9
.github/workflows/test-linting.yml
vendored
@ -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
|
||||
|
||||
Loading…
Reference in New Issue
Block a user