fix signing
All checks were successful
Docker Build Smart Logic / Build amd64 & arm64 (push) Successful in 23s
All checks were successful
Docker Build Smart Logic / Build amd64 & arm64 (push) Successful in 23s
This commit is contained in:
@@ -243,22 +243,28 @@ jobs:
|
|||||||
path: sbom.spdx.json
|
path: sbom.spdx.json
|
||||||
|
|
||||||
- name: Install cosign
|
- name: Install cosign
|
||||||
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
curl -sSfL https://github.com/sigstore/cosign/releases/latest/download/cosign-linux-amd64 \
|
curl -sSfL https://github.com/sigstore/cosign/releases/latest/download/cosign-linux-amd64 \
|
||||||
-o /usr/local/bin/cosign
|
-o cosign
|
||||||
chmod +x /usr/local/bin/cosign
|
chmod +x cosign
|
||||||
|
mv cosign /usr/local/bin/
|
||||||
|
cosign version
|
||||||
|
|
||||||
- name: Sign image
|
- name: Sign image
|
||||||
if: env.IS_TAG == 'true'
|
if: env.IS_TAG == 'true'
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
IMAGE_NAME="${REGISTRY_HOST}/${IMAGE_BASE}"
|
echo "IMAGE_NAME=${REGISTRY_HOST}/${IMAGE_BASE}"
|
||||||
# Filter nur das erste Tag aus DOCKER_TAGS (falls mehrere)
|
echo "VERSION=${VERSION}"
|
||||||
IMAGE_TO_SIGN=$(echo "$DOCKER_TAGS" | cut -d',' -f1)
|
|
||||||
|
IMAGE_TO_SIGN="${REGISTRY_HOST}/${IMAGE_BASE}:${VERSION}"
|
||||||
|
|
||||||
echo "Signing image $IMAGE_TO_SIGN"
|
echo "Signing image $IMAGE_TO_SIGN"
|
||||||
cosign sign --key ${{ secrets.COSIGN_KEY }} "$IMAGE_TO_SIGN"
|
cosign sign --key ${{ secrets.COSIGN_KEY }} "$IMAGE_TO_SIGN"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user