File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 9999
100100 docker build $docker_args m365/image
101101 echo "digest=$(docker images --no-trunc --quiet $Env:IMAGE.ToLower())" >> $Env:GITHUB_OUTPUT
102+ echo "image=$Env:IMAGE.ToLower()" >> $Env:GITHUB_OUTPUT
102103 if ($Env:PUSH -eq "true") {
103104 docker push $Env:IMAGE.ToLower() --all-tags
104105 }
@@ -123,15 +124,18 @@ jobs:
123124 cosign sign --yes "$_@$digest"
124125 }
125126 exit 0
127+ outputs :
128+ image : ${{ steps.build-and-push.outputs.image }}
126129 m365-scan :
127130 name : Scan
128131 if : github.ref == 'refs/heads/scanning'
132+ needs : build
129133 runs-on : ubuntu-latest
130134 steps :
131135 - name : Run Trivy vulnerability scanner
132136 uses : aquasecurity/trivy-action@0.28.0
133137 with :
134- image-ref : ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest
138+ image-ref : ${{ needs.build.outputs.image }}:latest
135139 format : ' sarif'
136140 output : ' trivy-results.sarif'
137141
You can’t perform that action at this time.
0 commit comments