Skip to content

Commit

Permalink
Add condition to skip Trivy vulnerability scanner on pull requests
Browse files Browse the repository at this point in the history
  • Loading branch information
codebytes committed Feb 14, 2024
1 parent 91a21ad commit cb24a02
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ jobs:
cache-from: type=gha
cache-to: type=gha,mode=max
- name: Run Trivy vulnerability scanner
if: ${{ github.event_name != 'pull_request' }}
uses: aquasecurity/trivy-action@master
with:
image-ref: ${{ fromJSON(steps.build-and-push.outputs.metadata)['image.name'] }}
Expand Down

0 comments on commit cb24a02

Please sign in to comment.