diff --git a/.github/workflows/docker-publish.yml b/.github/workflows/docker-publish.yml index 41272c7..f1c37bf 100644 --- a/.github/workflows/docker-publish.yml +++ b/.github/workflows/docker-publish.yml @@ -71,24 +71,14 @@ jobs: uses: docker/build-push-action@ac9327eae2b366085ac7f6a2d02df8aa8ead720a with: context: . - push: ${{ github.event_name != 'pull_request' && contains(github.ref, 'refs/tags/') }} + push: ${{ github.event_name != 'pull_request' }} tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} cache-from: type=gha cache-to: type=gha,mode=max - - name: Sign image with a key - if: ${{ github.event_name != 'pull_request' && contains(github.ref, 'refs/tags/') }} - run: | - cosign sign --yes --key env://COSIGN_PRIVATE_KEY "${TAGS}@${DIGEST}" - env: - TAGS: ${{ steps.docker_meta.outputs.tags }} - COSIGN_PRIVATE_KEY: ${{ secrets.COSIGN_PRIVATE_KEY }} - COSIGN_PASSWORD: ${{ secrets.COSIGN_PASSWORD }} - DIGEST: ${{ steps.build-and-push.outputs.digest }} - - name: Sign the images with GitHub OIDC Token - if: ${{ github.event_name != 'pull_request' && contains(github.ref, 'refs/tags/') }} + if: ${{ github.event_name != 'pull_request' }} env: DIGEST: ${{ steps.build-and-push.outputs.digest }} TAGS: ${{ steps.docker_meta.outputs.tags }}