This commit is contained in:
40
.drone.yml
40
.drone.yml
@@ -56,27 +56,27 @@ steps:
|
|||||||
# --------------------------------------------------
|
# --------------------------------------------------
|
||||||
# 2️⃣ Sign Image with Cosign (Secret-Key aus Variable)
|
# 2️⃣ Sign Image with Cosign (Secret-Key aus Variable)
|
||||||
# --------------------------------------------------
|
# --------------------------------------------------
|
||||||
- name: sign-image
|
- name: sign-image
|
||||||
image: alpine:3.20
|
image: alpine:3.20
|
||||||
environment:
|
environment:
|
||||||
COSIGN_KEY:
|
COSIGN_KEY:
|
||||||
from_secret: COSIGN_KEY
|
from_secret: COSIGN_KEY
|
||||||
COSIGN_PASSWORD:
|
COSIGN_PASSWORD:
|
||||||
from_secret: COSIGN_PASSWORD
|
from_secret: COSIGN_PASSWORD
|
||||||
IMAGE_DIGEST:
|
IMAGE_DIGEST:
|
||||||
from_secret: IMAGE_DIGEST # Optional – oder aus export-env
|
from_secret: IMAGE_DIGEST # Optional – oder aus export-env
|
||||||
commands:
|
commands:
|
||||||
- echo "=== 🔏 Installing Cosign v3.0.2 ==="
|
- echo "=== 🔏 Installing Cosign v3.0.2 ==="
|
||||||
- apk add --no-cache curl ca-certificates
|
- apk add --no-cache curl ca-certificates
|
||||||
- curl -sSL -o /usr/local/bin/cosign https://github.com/sigstore/cosign/releases/download/v3.0.2/cosign-linux-amd64
|
- curl -sSL -o /usr/local/bin/cosign https://github.com/sigstore/cosign/releases/download/v3.0.2/cosign-linux-amd64
|
||||||
- chmod +x /usr/local/bin/cosign
|
- chmod +x /usr/local/bin/cosign
|
||||||
|
|
||||||
- echo "=== 🔏 Signing Image ==="
|
- echo "=== 🔏 Signing Image ==="
|
||||||
- cosign version
|
- cosign version
|
||||||
- cosign sign --yes --key env://COSIGN_KEY "$IMAGE_DIGEST"
|
- cosign sign --yes --key env://COSIGN_KEY "$IMAGE_DIGEST"
|
||||||
- echo "✅ Image signed successfully."
|
- echo "✅ Image signed successfully."
|
||||||
depends_on:
|
depends_on:
|
||||||
- export-env
|
- export-env
|
||||||
|
|
||||||
# --------------------------------------------------
|
# --------------------------------------------------
|
||||||
# 3️⃣ Create Gitea Release
|
# 3️⃣ Create Gitea Release
|
||||||
|
|||||||
Reference in New Issue
Block a user