From f8bac307cf5b3d47c008be967a74e71173ad6714 Mon Sep 17 00:00:00 2001 From: Norbert Gruszka <40759761+norbertgruszka@users.noreply.github.com> Date: Thu, 30 Nov 2023 11:34:21 +0100 Subject: [PATCH] Update docker-publish.yml --- .github/workflows/docker-publish.yml | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) 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 }}