Skip to content

Commit

Permalink
Add goreleaser files
Browse files Browse the repository at this point in the history
  • Loading branch information
Tomy2e committed Nov 23, 2022
1 parent 3bb0b06 commit 29be71a
Show file tree
Hide file tree
Showing 3 changed files with 58 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
dist/
53 changes: 53 additions & 0 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
builds:
- env:
- CGO_ENABLED=0
goos:
- linux
goarch:
- amd64
- arm64
archives:
- format: binary
name_template: "{{ .ProjectName }}-{{ .Os }}-{{ .Arch }}"
checksum:
name_template: "checksums.txt"
snapshot:
name_template: "{{ incpatch .Version }}-next"
changelog:
sort: asc
filters:
exclude:
- "^docs:"
- "^test:"
dockers:
- image_templates:
- "ghcr.io/tomy2e/{{ .ProjectName }}:v{{ .Version }}-amd64"
use: buildx
dockerfile: Dockerfile.goreleaser
build_flag_templates:
- "--platform=linux/amd64"
- image_templates:
- "ghcr.io/tomy2e/{{ .ProjectName }}:v{{ .Version }}-arm64v8"
use: buildx
goarch: arm64
dockerfile: Dockerfile.goreleaser
build_flag_templates:
- "--platform=linux/arm64/v8"
docker_manifests:
- name_template: ghcr.io/tomy2e/{{ .ProjectName }}:v{{ .Version }}
image_templates:
- ghcr.io/tomy2e/{{ .ProjectName }}:v{{ .Version }}-amd64
- ghcr.io/tomy2e/{{ .ProjectName }}:v{{ .Version }}-arm64v8
- name_template: ghcr.io/tomy2e/{{ .ProjectName }}:latest
image_templates:
- ghcr.io/tomy2e/{{ .ProjectName }}:v{{ .Version }}-amd64
- ghcr.io/tomy2e/{{ .ProjectName }}:v{{ .Version }}-arm64v8
release:
footer: |
## Docker image
```bash
docker pull ghcr.io/tomy2e/{{ .ProjectName }}:v{{ .Version }}
```
# yaml-language-server: $schema=https://goreleaser.com/static/schema.json
4 changes: 4 additions & 0 deletions Dockerfile.goreleaser
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
FROM gcr.io/distroless/static-debian11
COPY ovh-dynhost-updater /ovh-dynhost-updater
USER 65534:65534
ENTRYPOINT ["/ovh-dynhost-updater"]

0 comments on commit 29be71a

Please sign in to comment.