From 119d76c1dae708a3ed3bd2ddc33967bd42d7e6da Mon Sep 17 00:00:00 2001 From: Berry den Hartog <38954346+berrydenhartog@users.noreply.github.com> Date: Tue, 14 May 2024 11:16:38 +0000 Subject: [PATCH] Fix trivy image scanning --- .github/workflows/ci.yml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index da01aaa05..b0ed83982 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -168,6 +168,13 @@ jobs: env: DOCKER_METADATA_ANNOTATIONS_LEVELS: manifest,index + - name: print metadata + run: | + echo "tags: ${{ steps.meta.outputs.tags }}" + echo "labels: ${{ steps.meta.outputs.labels }}" + echo "annotations: ${{ steps.meta.outputs.annotations }}" + + - name: Build and push Docker image uses: docker/build-push-action@v5 with: @@ -182,7 +189,7 @@ jobs: - name: Run Trivy vulnerability scanner uses: aquasecurity/trivy-action@master with: - image-ref: ${{ steps.meta.outputs.tags[0] }} + image-ref: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ steps.meta.outputs.tags[0] }} trivy-config: trivy.yaml scan-type: image exit-code: 0