Skip to content

Commit

Permalink
fix(github): fix Trivy scanning - rely on sha tagged image
Browse files Browse the repository at this point in the history
  • Loading branch information
Tomasz Gągor committed Mar 16, 2021
1 parent 96af3fa commit 2b9e0d4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,15 @@ jobs:
docker build --tag ghcr.io/tgagor/centos-stream --cache-from ghcr.io/tgagor/centos-stream .
docker run --name tgagor-centos-stream ghcr.io/tgagor/centos-stream true
docker export tgagor-centos-stream | docker import - ghcr.io/tgagor/centos-stream
docker tag ghcr.io/tgagor/centos-stream ghcr.io/tgagor/centos-stream:${GITHUB_REF##*/}
docker tag ghcr.io/tgagor/centos-stream ghcr.io/tgagor/centos-stream:${{ github.sha }}
docker tag ghcr.io/tgagor/centos-stream ghcr.io/tgagor/centos-stream:${GITHUB_REF##*/}
docker push ghcr.io/tgagor/centos-stream
docker push ghcr.io/tgagor/centos-stream:${GITHUB_REF##*/}
- name: Run Trivy vulnerability scanner
uses: aquasecurity/trivy-action@master
with:
image-ref: ghcr.io/tgagor/centos-stream
image-ref: ghcr.io/tgagor/centos-stream:${{ github.sha }}
format: template
template: '@/contrib/sarif.tpl'
# don't fail
Expand Down

0 comments on commit 2b9e0d4

Please sign in to comment.