diff --git a/.github/workflows/secrets-scan.yaml b/.github/workflows/secrets-scan.yaml index 77744d1..82a11fd 100644 --- a/.github/workflows/secrets-scan.yaml +++ b/.github/workflows/secrets-scan.yaml @@ -38,6 +38,15 @@ jobs: with: ref: ${{ github.head_ref }} + - name: Check if workdir exists + id: check + run: | + if [ -d "${{ matrix.workdir }}" ]; then + echo "exists=true" >> $GITHUB_OUTPUT + else + echo "exists=false" >> $GITHUB_OUTPUT + fi + - name: Run Aqua Security Trivy uses: aquasecurity/trivy-action@0.15.0 with: @@ -47,6 +56,7 @@ jobs: scanners: secret output: trivy.txt exit-code: 1 + if: steps.check.outputs.exists == 'true' - name: Post PR comments if: failure()