From 31243a46e57d11ad3dcbf8cd6499dffa15ebb112 Mon Sep 17 00:00:00 2001 From: anderssonw Date: Thu, 21 Sep 2023 10:30:32 +0200 Subject: [PATCH] add docker signatures with cosign and image template to dockers field --- .goreleaser.yaml | 25 ++++++++++++++++++++----- 1 file changed, 20 insertions(+), 5 deletions(-) diff --git a/.goreleaser.yaml b/.goreleaser.yaml index a8ad72b5..2862faa1 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -33,17 +33,32 @@ archives: dockers: - image_templates: + - "ghcr.io/kartverket/skiperator" + - "ghcr.io/kartverket/skiperator:latest" - "ghcr.io/kartverket/skiperator:{{ .Version }}" extra_files: - ./ -docker_manifests: - - name_template: "ghcr.io/kartverket/skiperator:{{ .Version }}" + dockerfile: Dockerfile + +docker_signs: + - artifacts: all + cmd: cosign + args: + - "sign" + - "--oidc-issuer=https://token.actions.githubusercontent.com" + - "${artifact}" + - "--yes" signs: - - cmd: cosign + - artifacts: all + cmd: cosign signature: "${artifact}.sig" - args: ["sign-blob", "--oidc-issuer=https://token.actions.githubusercontent.com", "--output-signature=${signature}", "-y", "${artifact}"] - artifacts: all + args: + - "sign-blob" + - "--oidc-issuer=https://token.actions.githubusercontent.com" + - "--output-signature=${signature}" + - "${artifact}" + - "--yes" sboms: - artifacts: archive