Skip to content

Commit

Permalink
fix(build): add short sha for trivy (#8)
Browse files Browse the repository at this point in the history
  • Loading branch information
kengou authored Sep 15, 2024
1 parent 5d2b429 commit 9265810
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 9265810

Please sign in to comment.