Skip to content

Commit

Permalink
fix(build): add short sha for trivy
Browse files Browse the repository at this point in the history
  • Loading branch information
kengou committed Sep 15, 2024
1 parent 5d2b429 commit ecbee32
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion .github/workflows/docker-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,14 @@ jobs:
needs: build
runs-on: [ default ]
steps:
- name: Set sha
id: vars
run: echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
- name: Run Trivy vulnerability scanner
uses: aquasecurity/trivy-action@master
if: success()
with:
image-ref: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ github.sha }}
image-ref: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ steps.vars.outputs.sha_short }}
ignore-unfixed: true
format: 'sarif'
output: 'trivy-results.sarif'
Expand Down

0 comments on commit ecbee32

Please sign in to comment.