From 386edef250b1ddfa300cf6b8dbb33764b87b2cf4 Mon Sep 17 00:00:00 2001 From: Norbert Gruszka Date: Thu, 30 Nov 2023 11:29:57 +0100 Subject: [PATCH] Revert "Update docker-publish.yml" This reverts commit b7e5aa21c06513527024e1d80d7d49acfb5c16e7. --- .github/workflows/docker-publish.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/docker-publish.yml b/.github/workflows/docker-publish.yml index 9e9f047..41272c7 100644 --- a/.github/workflows/docker-publish.yml +++ b/.github/workflows/docker-publish.yml @@ -71,14 +71,14 @@ jobs: uses: docker/build-push-action@ac9327eae2b366085ac7f6a2d02df8aa8ead720a with: context: . - push: ${{ github.event_name != 'pull_request' }} + push: ${{ github.event_name != 'pull_request' && contains(github.ref, 'refs/tags/') }} 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' }} + if: ${{ github.event_name != 'pull_request' && contains(github.ref, 'refs/tags/') }} run: | cosign sign --yes --key env://COSIGN_PRIVATE_KEY "${TAGS}@${DIGEST}" env: @@ -88,7 +88,7 @@ jobs: DIGEST: ${{ steps.build-and-push.outputs.digest }} - name: Sign the images with GitHub OIDC Token - if: ${{ github.event_name != 'pull_request' }} + if: ${{ github.event_name != 'pull_request' && contains(github.ref, 'refs/tags/') }} env: DIGEST: ${{ steps.build-and-push.outputs.digest }} TAGS: ${{ steps.docker_meta.outputs.tags }}