Disable binary signing in snapshot mode

Snapshot builds failed for external contributors due to cosign.
Since snapshot builds are not official releases, we do not need
to sign binaries. Disabling signing in this mode fixes the issue.

Signed-off-by: Bryan Frimin <bryan@getprobo.com>
This commit is contained in:
Bryan Frimin
2025-08-22 10:55:56 +02:00
parent 82f3093d7d
commit ccbd9e250c

View File

@@ -74,16 +74,18 @@ sboms:
- "--source-version={{ .Version }}" - "--source-version={{ .Version }}"
signs: signs:
- cmd: cosign - cmd: sh
env: env:
- COSIGN_EXPERIMENTAL=1 - COSIGN_EXPERIMENTAL=1
certificate: "${artifact}.pem" certificate: "${artifact}.pem"
args: args:
- sign-blob - -c
- "--output-certificate=${certificate}" - |
- "--output-signature=${signature}" if [ "{{ .IsSnapshot }}" = "true" ]; then
- "${artifact}" echo "Skipping signing (snapshot: {{ .IsSnapshot }})"
- "--yes" else
cosign sign-blob --output-certificate="${certificate}" --output-signature="${signature}" "${artifact}" --yes
fi
artifacts: checksum artifacts: checksum
output: true output: true
@@ -101,25 +103,33 @@ docker_manifests:
docker_signs: docker_signs:
- id: images - id: images
cmd: cosign cmd: sh
env: env:
- COSIGN_EXPERIMENTAL=1 - COSIGN_EXPERIMENTAL=1
artifacts: images artifacts: images
output: true output: true
args: args:
- "sign" - -c
- "${artifact}@${digest}" - |
- "--yes" if [ "{{ .IsSnapshot }}" = "true" ]; then
echo "Skipping Docker image signing (snapshot: {{ .IsSnapshot }})"
else
cosign sign "${artifact}@${digest}" --yes
fi
- id: manifests - id: manifests
cmd: cosign cmd: sh
env: env:
- COSIGN_EXPERIMENTAL=1 - COSIGN_EXPERIMENTAL=1
artifacts: manifests artifacts: manifests
output: true output: true
args: args:
- "sign" - -c
- "${artifact}@${digest}" - |
- "--yes" if [ "{{ .IsSnapshot }}" = "true" ]; then
echo "Skipping Docker manifest signing (snapshot: {{ .IsSnapshot }})"
else
cosign sign "${artifact}@${digest}" --yes
fi
dockers: dockers:
- image_templates: - image_templates: