pass server arg on fs scan

This commit is contained in:
2026-02-26 21:58:46 +01:00
parent fe4fa79289
commit 97ed0a241c

View File

@@ -123,7 +123,10 @@ jobs:
- uses: https://gitea.t000-n.de/t.behrendt/trivy-actions/setup-trivy@83a7cef9f19e3a5a30311839f99f83690a490cf8 # 1.4.5
- uses: https://gitea.t000-n.de/t.behrendt/trivy-actions/setup-db@83a7cef9f19e3a5a30311839f99f83690a490cf8 # 1.4.5
- run: |
trivy fs --cache-dir "$TRIVY_CACHE_DIR" --exit-code 0 --format sarif --output fs-sarif.json --scanners vuln .
server="${{ inputs.trivy-server-url }}"
args=(fs --cache-dir "$TRIVY_CACHE_DIR" --exit-code 0 --format sarif --output fs-sarif.json --scanners vuln .)
[ -n "$server" ] && args+=(--server "$server")
trivy "${args[@]}"
env:
TRIVY_CACHE_DIR: ${{ runner.temp }}/trivy
- uses: https://github.com/ChristopherHX/gitea-upload-artifact@v4