From 5b74a931aaad4a2d6abefaf7d8b68e792e28d547 Mon Sep 17 00:00:00 2001 From: perf3ct Date: Wed, 31 Jul 2024 11:58:49 -0700 Subject: [PATCH] fix push action ids --- .github/workflows/main.yml | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index e2c53dcb5..1e70ba6c4 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -179,7 +179,7 @@ jobs: - uses: docker/setup-buildx-action@v3 - name: Build and push container image to GHCR uses: docker/build-push-action@v6 - id: push + id: ghcr-push with: context: . push: true @@ -191,7 +191,7 @@ jobs: uses: actions/attest-build-provenance@v1 with: 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 - name: Log in to the GHCR container registry uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1 @@ -201,7 +201,7 @@ jobs: password: ${{ secrets.DOCKERHUB_TOKEN }} - name: Build and push image to DockerHub uses: docker/build-push-action@v6 - id: push + id: dh-push with: context: . push: true @@ -209,3 +209,9 @@ jobs: labels: ${{ steps.dh-meta.outputs.labels }} cache-from: type=gha 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