Skip to content

Commit

Permalink
Update docker-publish.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
norbertgruszka authored Nov 30, 2023
1 parent 1ebea97 commit b7e5aa2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/docker-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,14 +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/') }}
if: ${{ github.event_name != 'pull_request' }}
run: |
cosign sign --yes --key env://COSIGN_PRIVATE_KEY "${TAGS}@${DIGEST}"
env:
Expand All @@ -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' && 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 }}
Expand Down

0 comments on commit b7e5aa2

Please sign in to comment.