fix push action ids

This commit is contained in:
perf3ct 2024-07-31 11:58:49 -07:00
parent ee4544cefe
commit 5b74a931aa
No known key found for this signature in database
GPG Key ID: 569C4EEC436F5232

View File

@ -179,7 +179,7 @@ jobs:
- uses: docker/setup-buildx-action@v3 - uses: docker/setup-buildx-action@v3
- name: Build and push container image to GHCR - name: Build and push container image to GHCR
uses: docker/build-push-action@v6 uses: docker/build-push-action@v6
id: push id: ghcr-push
with: with:
context: . context: .
push: true push: true
@ -191,7 +191,7 @@ jobs:
uses: actions/attest-build-provenance@v1 uses: actions/attest-build-provenance@v1
with: with:
subject-name: ${{ env.GHCR_REGISTRY }}/${{ env.IMAGE_NAME}} subject-name: ${{ env.GHCR_REGISTRY }}/${{ env.IMAGE_NAME}}
subject-digest: ${{ steps.push.outputs.digest }} subject-digest: ${{ steps.ghcr-push.outputs.digest }}
push-to-registry: true push-to-registry: true
- name: Log in to the GHCR container registry - name: Log in to the GHCR container registry
uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1 uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1
@ -201,7 +201,7 @@ jobs:
password: ${{ secrets.DOCKERHUB_TOKEN }} password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push image to DockerHub - name: Build and push image to DockerHub
uses: docker/build-push-action@v6 uses: docker/build-push-action@v6
id: push id: dh-push
with: with:
context: . context: .
push: true push: true
@ -209,3 +209,9 @@ jobs:
labels: ${{ steps.dh-meta.outputs.labels }} labels: ${{ steps.dh-meta.outputs.labels }}
cache-from: type=gha cache-from: type=gha
cache-to: type=gha,mode=max cache-to: type=gha,mode=max
- name: Generate and push artifact attestation to DockerHub
uses: actions/attest-build-provenance@v1
with:
subject-name: ${{ env.DOCKERHUB_REGISTRY }}/${{ env.IMAGE_NAME}}
subject-digest: ${{ steps.dh-push.outputs.digest }}
push-to-registry: true