Skip to content

Commit

Permalink
[improve][ci] Continue Pulsar CI build even when Trivy scanner fails (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
lhotari authored Oct 4, 2024
1 parent 1e93677 commit 56200aa
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion .github/workflows/pulsar-ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -890,8 +890,10 @@ jobs:
run: src/check-binary-license.sh ./distribution/server/target/apache-pulsar-*-bin.tar.gz && src/check-binary-license.sh ./distribution/shell/target/apache-pulsar-shell-*-bin.tar.gz

- name: Run Trivy container scan
id: trivy_scan
uses: aquasecurity/trivy-action@master
if: ${{ github.repository == 'apache/pulsar' && github.event_name != 'pull_request' }}
continue-on-error: true
with:
image-ref: "apachepulsar/pulsar:latest"
scanners: vuln
Expand All @@ -902,7 +904,8 @@ jobs:

- name: Upload Trivy scan results to GitHub Security tab
uses: github/codeql-action/upload-sarif@v3
if: ${{ github.repository == 'apache/pulsar' && github.event_name != 'pull_request' }}
if: ${{ steps.trivy_scan.outcome == 'success' && github.repository == 'apache/pulsar' && github.event_name != 'pull_request' }}
continue-on-error: true
with:
sarif_file: 'trivy-results.sarif'

Expand Down

0 comments on commit 56200aa

Please sign in to comment.