Skip to content

Commit 2786584

Browse files
authored
Merge pull request #170 from jnoordsij/disable-pr-image-signing
Disable image signing for PR workflows
2 parents 0458eba + 896b4e5 commit 2786584

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

.github/workflows/docker-publish.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ jobs:
9999
cache-to: type=gha,mode=max
100100

101101
- name: Sign the published Docker image
102-
if: ${{ steps.docker_version_check.outputs.tag == 'true' }}
102+
if: ${{ (steps.docker_version_check.outputs.tag == 'true') && (github.event_name != 'pull_request') }}
103103
run: echo "${{ steps.meta.outputs.tags }}" | xargs -I {} cosign sign --yes {}@${{ steps.build-and-push.outputs.digest }}
104104

105105

@@ -122,7 +122,7 @@ jobs:
122122
cache-to: type=gha,mode=max
123123

124124
- name: Sign the published Docker image - smbd-only
125-
if: ${{ steps.docker_version_check.outputs.tag == 'true' }}
125+
if: ${{ (steps.docker_version_check.outputs.tag == 'true') && (github.event_name != 'pull_request') }}
126126
run: echo "${{ steps.meta.outputs.tags }}" | xargs -I {} cosign sign --yes {}@${{ steps.build-and-push-smbd-only.outputs.digest }}
127127

128128

@@ -140,7 +140,7 @@ jobs:
140140
cache-to: type=gha,mode=max
141141

142142
- name: Sign the published Docker image - smbd-avahi
143-
if: ${{ steps.docker_version_check.outputs.tag == 'true' }}
143+
if: ${{ (steps.docker_version_check.outputs.tag == 'true') && (github.event_name != 'pull_request') }}
144144
run: echo "${{ steps.meta.outputs.tags }}" | xargs -I {} cosign sign --yes {}@${{ steps.build-and-push-smbd-avahi.outputs.digest }}
145145

146146

@@ -158,5 +158,5 @@ jobs:
158158
cache-to: type=gha,mode=max
159159

160160
- name: Sign the published Docker image - smbd-wsdd2
161-
if: ${{ steps.docker_version_check.outputs.tag == 'true' }}
161+
if: ${{ (steps.docker_version_check.outputs.tag == 'true') && (github.event_name != 'pull_request') }}
162162
run: echo "${{ steps.meta.outputs.tags }}" | xargs -I {} cosign sign --yes {}@${{ steps.build-and-push-smbd-wsdd2.outputs.digest }}

0 commit comments

Comments
 (0)