Skip to content

Commit bef308d

Browse files
committed
Fix goreleaser
Signed-off-by: Bryan Frimin <bryan@getprobo.com>
1 parent 42154d2 commit bef308d

2 files changed

Lines changed: 25 additions & 54 deletions

File tree

.goreleaser.yaml

Lines changed: 23 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,11 @@ builds:
3636
goarm:
3737
- "6"
3838
- "7"
39+
ignore:
40+
- goos: windows
41+
goarch: arm
42+
- goos: darwin
43+
goarch: arm
3944
# Docker-specific builds for Linux only
4045
- id: privatebin-docker
4146
main: ./cmd/privatebin
@@ -111,59 +116,26 @@ signs:
111116
artifacts: checksum
112117
output: true
113118

114-
dockers:
115-
- image_templates:
116-
- "ghcr.io/gearnode/privatebin:{{ .Tag }}-amd64"
117-
- "ghcr.io/gearnode/privatebin:latest-amd64"
118-
dockerfile: Dockerfile
119-
use: buildx
120-
build_flag_templates:
121-
- "--platform=linux/amd64"
122-
- "--label=org.opencontainers.image.title={{.ProjectName}}"
123-
- "--label=org.opencontainers.image.description=A CLI for PrivateBin"
124-
- "--label=org.opencontainers.image.url=https://github.com/gearnode/privatebin"
125-
- "--label=org.opencontainers.image.source=https://github.com/gearnode/privatebin"
126-
- "--label=org.opencontainers.image.version={{.Version}}"
127-
- '--label=org.opencontainers.image.created={{time "2006-01-02T15:04:05Z07:00"}}'
128-
- "--label=org.opencontainers.image.revision={{.FullCommit}}"
129-
- "--label=org.opencontainers.image.licenses=ISC"
119+
dockers_v2:
120+
- images:
121+
- "ghcr.io/gearnode/privatebin"
122+
tags:
123+
- "{{ .Tag }}"
124+
- latest
130125
ids:
131126
- privatebin-docker
132-
goos: linux
133-
goarch: amd64
134-
skip_push: "{{ .IsSnapshot }}"
135-
- image_templates:
136-
- "ghcr.io/gearnode/privatebin:{{ .Tag }}-arm64"
137-
- "ghcr.io/gearnode/privatebin:latest-arm64"
138-
dockerfile: Dockerfile
139-
use: buildx
140-
build_flag_templates:
141-
- "--platform=linux/arm64"
142-
- "--label=org.opencontainers.image.title={{.ProjectName}}"
143-
- "--label=org.opencontainers.image.description=A CLI for PrivateBin"
144-
- "--label=org.opencontainers.image.url=https://github.com/gearnode/privatebin"
145-
- "--label=org.opencontainers.image.source=https://github.com/gearnode/privatebin"
146-
- "--label=org.opencontainers.image.version={{.Version}}"
147-
- '--label=org.opencontainers.image.created={{time "2006-01-02T15:04:05Z07:00"}}'
148-
- "--label=org.opencontainers.image.revision={{.FullCommit}}"
149-
- "--label=org.opencontainers.image.licenses=ISC"
150-
ids:
151-
- privatebin-docker
152-
goos: linux
153-
goarch: arm64
154-
skip_push: "{{ .IsSnapshot }}"
155-
156-
docker_manifests:
157-
- name_template: "ghcr.io/gearnode/privatebin:{{ .Tag }}"
158-
image_templates:
159-
- "ghcr.io/gearnode/privatebin:{{ .Tag }}-amd64"
160-
- "ghcr.io/gearnode/privatebin:{{ .Tag }}-arm64"
161-
skip_push: "{{ .IsSnapshot }}"
162-
- name_template: "ghcr.io/gearnode/privatebin:latest"
163-
image_templates:
164-
- "ghcr.io/gearnode/privatebin:latest-amd64"
165-
- "ghcr.io/gearnode/privatebin:latest-arm64"
166-
skip_push: "{{ .IsSnapshot }}"
127+
platforms:
128+
- linux/amd64
129+
- linux/arm64
130+
labels:
131+
"org.opencontainers.image.title": "{{.ProjectName}}"
132+
"org.opencontainers.image.description": "A CLI for PrivateBin"
133+
"org.opencontainers.image.url": "https://github.com/gearnode/privatebin"
134+
"org.opencontainers.image.source": "https://github.com/gearnode/privatebin"
135+
"org.opencontainers.image.version": "{{.Version}}"
136+
"org.opencontainers.image.created": '{{time "2006-01-02T15:04:05Z07:00"}}'
137+
"org.opencontainers.image.revision": "{{.FullCommit}}"
138+
"org.opencontainers.image.licenses": "ISC"
167139

168140
docker_signs:
169141
- id: images

Dockerfile

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,14 @@
11
FROM ubuntu:22.04
22

3-
LABEL org.opencontainers.image.source="https://github.com/gearnode/privatebin"
4-
LABEL org.opencontainers.image.licenses="ISC"
3+
ARG TARGETPLATFORM
54

65
RUN useradd -m privatebin && \
76
apt-get update && \
87
apt-get upgrade -y && \
98
apt-get install -y ca-certificates && \
109
rm -rf /var/lib/apt/lists/*
1110

12-
COPY privatebin /usr/local/bin/privatebin
11+
COPY $TARGETPLATFORM/privatebin /usr/local/bin/privatebin
1312
RUN chmod +x /usr/local/bin/privatebin
1413

1514
USER privatebin

0 commit comments

Comments
 (0)