diff --git a/.github/workflows/push.yaml b/.github/workflows/push.yaml index c63ec58..6331dd1 100644 --- a/.github/workflows/push.yaml +++ b/.github/workflows/push.yaml @@ -6,7 +6,6 @@ on: - main paths-ignore: - '**.md' - - '.github/**' - '.gitignore' workflow_dispatch: @@ -28,7 +27,7 @@ jobs: uses: actions/checkout@v4 - name: Log in to the Container registry - uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1 + uses: docker/login-action@v3 with: registry: ${{ env.REGISTRY }} username: ${{ github.actor }} @@ -40,11 +39,12 @@ jobs: install-cuda: false cog-version: v0.9.12 - run: | - cog push ${{ env.REGISTRY }}/${{ env.IMAGE_NAME}}:latest --use-cuda-base-image false + digest=$(cog push ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest --use-cuda-base-image false | grep 'digest: sha256' | awk '{ print $3 }') + echo "digest=$digest" >> $GITHUB_ENV - name: Generate artifact attestation uses: actions/attest-build-provenance@v1 with: subject-name: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME}} - subject-digest: ${{ steps.push.outputs.digest }} + subject-digest: ${{ env.digest }} push-to-registry: true