Skip to content

Commit 29be71a

Browse files
committed
Add goreleaser files
1 parent 3bb0b06 commit 29be71a

File tree

3 files changed

+58
-0
lines changed

3 files changed

+58
-0
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
dist/

.goreleaser.yaml

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
builds:
2+
- env:
3+
- CGO_ENABLED=0
4+
goos:
5+
- linux
6+
goarch:
7+
- amd64
8+
- arm64
9+
archives:
10+
- format: binary
11+
name_template: "{{ .ProjectName }}-{{ .Os }}-{{ .Arch }}"
12+
checksum:
13+
name_template: "checksums.txt"
14+
snapshot:
15+
name_template: "{{ incpatch .Version }}-next"
16+
changelog:
17+
sort: asc
18+
filters:
19+
exclude:
20+
- "^docs:"
21+
- "^test:"
22+
dockers:
23+
- image_templates:
24+
- "ghcr.io/tomy2e/{{ .ProjectName }}:v{{ .Version }}-amd64"
25+
use: buildx
26+
dockerfile: Dockerfile.goreleaser
27+
build_flag_templates:
28+
- "--platform=linux/amd64"
29+
- image_templates:
30+
- "ghcr.io/tomy2e/{{ .ProjectName }}:v{{ .Version }}-arm64v8"
31+
use: buildx
32+
goarch: arm64
33+
dockerfile: Dockerfile.goreleaser
34+
build_flag_templates:
35+
- "--platform=linux/arm64/v8"
36+
docker_manifests:
37+
- name_template: ghcr.io/tomy2e/{{ .ProjectName }}:v{{ .Version }}
38+
image_templates:
39+
- ghcr.io/tomy2e/{{ .ProjectName }}:v{{ .Version }}-amd64
40+
- ghcr.io/tomy2e/{{ .ProjectName }}:v{{ .Version }}-arm64v8
41+
- name_template: ghcr.io/tomy2e/{{ .ProjectName }}:latest
42+
image_templates:
43+
- ghcr.io/tomy2e/{{ .ProjectName }}:v{{ .Version }}-amd64
44+
- ghcr.io/tomy2e/{{ .ProjectName }}:v{{ .Version }}-arm64v8
45+
release:
46+
footer: |
47+
## Docker image
48+
49+
```bash
50+
docker pull ghcr.io/tomy2e/{{ .ProjectName }}:v{{ .Version }}
51+
```
52+
53+
# yaml-language-server: $schema=https://goreleaser.com/static/schema.json

Dockerfile.goreleaser

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
FROM gcr.io/distroless/static-debian11
2+
COPY ovh-dynhost-updater /ovh-dynhost-updater
3+
USER 65534:65534
4+
ENTRYPOINT ["/ovh-dynhost-updater"]

0 commit comments

Comments
 (0)