Skip to content

Commit 7733c8a

Browse files
committed
feat: upgrade to dockers_v2
Signed-off-by: Carlos Alexandro Becker <[email protected]>
1 parent 3afb710 commit 7733c8a

File tree

2 files changed

+15
-14
lines changed

2 files changed

+15
-14
lines changed

.goreleaser.yaml

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -67,26 +67,26 @@ signs:
6767

6868
# create a docker image
6969
# https://goreleaser.com/customization/docker
70-
dockers:
71-
- image_templates:
72-
- "ghcr.io/goreleaser/example-supply-chain:{{ .Tag }}"
70+
dockers_v2:
71+
- images:
72+
- "ghcr.io/goreleaser/example-supply-chain"
73+
tags:
74+
- latest
75+
- "{{ .Tag }}"
7376
dockerfile: Dockerfile
74-
build_flag_templates:
75-
- "--pull"
76-
- "--label=org.opencontainers.image.created={{.Date}}"
77-
- "--label=org.opencontainers.image.name={{.ProjectName}}"
78-
- "--label=org.opencontainers.image.revision={{.FullCommit}}"
79-
- "--label=org.opencontainers.image.version={{.Version}}"
80-
- "--label=org.opencontainers.image.source={{.GitURL}}"
77+
labels:
78+
org.opencontainers.image.created: "{{.Date}}"
79+
org.opencontainers.image.name: "{{.ProjectName}}"
80+
org.opencontainers.image.revision: "{{.FullCommit}}"
81+
org.opencontainers.image.version: "{{.Version}}"
82+
org.opencontainers.image.source: "{{.GitURL}}"
8183

8284
# signs our docker image
8385
# https://goreleaser.com/customization/docker_sign
8486
docker_signs:
8587
- cmd: cosign
86-
artifacts: images
8788
output: true
8889
args:
8990
- "sign"
9091
- "${artifact}"
91-
- "--yes" # needed on cosign 2.0.0+
92-
92+
- "--yes"

Dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
FROM scratch
2-
COPY supply-chain-example /usr/bin/supply-chain-example
2+
ARG TARGETPLATFORM
33
ENTRYPOINT [ "/usr/bin/supply-chain-example" ]
4+
COPY $TARGETPLATFORM/supply-chain-example /usr/bin/supply-chain-example

0 commit comments

Comments
 (0)