7272 build :
7373 needs : [ prepare ]
7474 runs-on : ubuntu-latest
75+ permissions :
76+ id-token : write
77+ contents : read
78+ attestations : write
79+ packages : write
7580 env :
7681 tag : ${{ needs.prepare.outputs.tag }}
7782 strategy :
@@ -162,9 +167,27 @@ jobs:
162167 password : ${{ secrets.registry_password }}
163168 registry : ${{ inputs.registry }}
164169
170+ - name : Log in to registry
171+ uses : redhat-actions/podman-login@main
172+ with :
173+ username : ${{ secrets.registry_username }}
174+ password : ${{ secrets.registry_password }}
175+ registry : ${{ inputs.registry }}
176+ - name : Generate artifact attestation
177+ uses : actions/attest-build-provenance@v2
178+ with :
179+ subject-name : ${{ inputs.registry }}/${{ steps.build.outputs.image }}
180+ subject-digest : ${{ steps.push.outputs.digest }}
181+ push-to-registry : true
182+
165183 manifest :
166184 needs : [ prepare, build ]
167185 runs-on : ubuntu-latest
186+ permissions :
187+ id-token : write
188+ contents : read
189+ attestations : write
190+ packages : write
168191 env :
169192 tag : ${{ needs.prepare.outputs.tag }}
170193 steps :
@@ -193,4 +216,11 @@ jobs:
193216 tags : ${{ env.tag }}
194217 username : ${{ secrets.registry_username }}
195218 password : ${{ secrets.registry_password }}
196- registry : ${{ inputs.registry }}
219+ registry : ${{ inputs.registry }}
220+
221+ - name : Generate artifact attestation
222+ uses : actions/attest-build-provenance@v2
223+ with :
224+ subject-name : ${{ inputs.registry }}/${{ inputs.image_name }}
225+ subject-digest : ${{ steps.push.outputs.digest }}
226+ push-to-registry : true
0 commit comments