fix: Correct digest reference in Docker artifact attestation

- Add id to build step to capture outputs
- Fix subject-digest reference from steps.build.outputs.digest
- Resolves 'One of subject-path or subject-digest must be provided' error

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Patryk Ciechanski
2025-06-12 10:02:18 +02:00
parent 6b1926c5f2
commit 3a76a42b84

View File

@@ -44,6 +44,7 @@ jobs:
type=raw,value=pr-${{ github.event.client_payload.pr_number }},enable=${{ github.event_name == 'repository_dispatch' && github.event.client_payload.pr_number != '' }}
- name: Build and push Docker image
id: build
uses: docker/build-push-action@v5
with:
context: .
@@ -57,5 +58,5 @@ jobs:
uses: actions/attest-build-provenance@v1
with:
subject-name: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME}}
subject-digest: ${{ steps.meta.outputs.digest }}
subject-digest: ${{ steps.build.outputs.digest }}
push-to-registry: true