Skip to content

Commit

Permalink
Switch to env vars for registry and image in trivy
Browse files Browse the repository at this point in the history
  • Loading branch information
sarg3nt committed Oct 29, 2024
1 parent 8c0b942 commit d102ec6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/trivy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,12 @@ jobs:
uses: docker/build-push-action@4f58ea79222b3b9dc2c8bbdd6debcef730109a75 # v6.9.0
with:
push: false
tags: ghcr.io/sarg3nt/go-docker-container:${{ github.sha }}
tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ github.sha }}

- name: Run Trivy vulnerability scanner
uses: aquasecurity/trivy-action@915b19bbe73b92a6cf82a1bc12b087c9a19a5fe2
with:
image-ref: 'ghcr.io/sarg3nt/go-docker-container:${{ github.sha }}'
image-ref: '${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ github.sha }}'
format: 'template'
template: '@/contrib/sarif.tpl'
output: 'trivy-results.sarif'
Expand Down

0 comments on commit d102ec6

Please sign in to comment.