6161 default : ' .'
6262 outputs :
6363 image_name :
64- description : " Full image name (<registry>/<image>)."
64+ description : ' Full image name (<registry>/<image>).'
6565 value : ${{ jobs.build-and-push-image.outputs.image_name }}
6666 image_digest :
67- description : " Pushed image digest (sha256:...), empty when push=false."
67+ description : ' Pushed image digest (sha256:...), empty when push=false.'
6868 value : ${{ jobs.build-and-push-image.outputs.image_digest }}
6969 image_ref :
70- description : " Immutable image reference (<registry>/<image>@<digest>), empty when push=false."
70+ description : ' Immutable image reference (<registry>/<image>@<digest>), empty when push=false.'
7171 value : ${{ jobs.build-and-push-image.outputs.image_ref }}
7272 local_image_ref :
73- description : " Local image reference used when push=false."
73+ description : ' Local image reference used when push=false.'
7474 value : ${{ jobs.build-and-push-image.outputs.local_image_ref }}
7575 secrets :
7676 registry-username :
@@ -179,14 +179,6 @@ jobs:
179179 echo "image_ref=${IMAGE_REF}"
180180 echo "local_image_ref=${LOCAL_IMAGE_REF}"
181181 } >> "${GITHUB_OUTPUT}"
182- - name : Generate artifact attestation
183- if : inputs.push
184- uses : actions/attest-build-provenance@96278af6caaf10aea03fd8d33a09a777ca52d62f # v3.2.0
185- with :
186- subject-name : ${{ inputs.registry }}/${{ inputs.image }}
187- subject-digest : ${{ steps.build.outputs.digest }}
188- push-to-registry : true
189- create-storage-record : ${{ startsWith(inputs.registry, 'ghcr.io') }}
190182 - name : Run Trivy Scan
191183 uses : aquasecurity/trivy-action@e368e328979b113139d6f9068e03accaed98a518 # v0.34.1
192184 if : inputs.scan-image
@@ -206,12 +198,14 @@ jobs:
206198 image-ref : ${{ format('{0}/{1}@{2}', inputs.registry, inputs.image, steps.build.outputs.digest) }}
207199 output : ${{ inputs.working-directory }}/sbom.spdx.json
208200 github-pat : ${{ secrets.GITHUB_TOKEN }}
209- - name : Attest SBOM
210- uses : actions/attest-sbom@4651f806c01d8637787e274ac3bdf724ef169f34 # v3.0.0
201+ - name : Generate artifact and SBOM attestation
211202 if : inputs.push
203+ uses : actions/attest@59d89421af93a897026c735860bf21b6eb4f7b26 # v4.1.0
212204 with :
213205 subject-name : ${{ inputs.registry }}/${{ inputs.image }}
214206 subject-digest : ${{ steps.build.outputs.digest }}
207+ push-to-registry : true
208+ create-storage-record : ${{ startsWith(inputs.registry, 'ghcr.io') }}
215209 sbom-path : ${{ inputs.working-directory }}/sbom.spdx.json
216210 - name : Install cosign
217211 uses : sigstore/cosign-installer@faadad0cce49287aee09b3a48701e75088a2c6ad # v4.0.0
0 commit comments