Skip to content

Commit

Permalink
chore: improve release informations (#135)
Browse files Browse the repository at this point in the history
  • Loading branch information
mavimo authored Oct 16, 2023
1 parent 5e9d877 commit 75990ce
Show file tree
Hide file tree
Showing 2 changed files with 63 additions and 15 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/release-controller.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ jobs:
- name: Set up QEMU
uses: docker/setup-qemu-action@v3

- uses: docker/setup-buildx-action@v3

- name: Login to DockerHub
uses: docker/login-action@v3
with:
Expand Down
76 changes: 61 additions & 15 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
project_name: ingress
before:
hooks:
- go mod tidy
Expand All @@ -11,37 +12,82 @@ builds:
goarch:
- amd64
- arm64
mod_timestamp: "{{ .CommitTimestamp }}"

dockers:
- image_templates:
- "caddy/ingress:test-image"
use: buildx
dockerfile: Dockerfile
- use: buildx
goos: linux
goarch: amd64
dockerfile: ./Dockerfile
skip_push: "true"
image_templates:
- "caddy/{{ .ProjectName }}:test-image"
build_flag_templates:
- "--platform=linux/amd64"
- "--pull"
- "--label=org.opencontainers.image.created={{.Date}}"
- "--label=org.opencontainers.image.name={{.ProjectName}}"
- "--label=org.opencontainers.image.revision={{.FullCommit}}"
- "--label=org.opencontainers.image.version={{.Version}}"

- image_templates:
- "caddy/ingress:{{ .Tag }}-amd64"
use: buildx
dockerfile: Dockerfile
- use: buildx
goos: linux
goarch: amd64
dockerfile: ./Dockerfile
image_templates:
- "caddy/{{ .ProjectName }}:{{ .Tag }}-amd64"
build_flag_templates:
- "--platform=linux/amd64"
- "--pull"
- "--label=org.opencontainers.image.created={{.Date}}"
- "--label=org.opencontainers.image.name={{.ProjectName}}"
- "--label=org.opencontainers.image.revision={{.FullCommit}}"
- "--label=org.opencontainers.image.version={{.Version}}"

- image_templates:
- "caddy/ingress:{{ .Tag }}-arm64v8"
use: buildx
dockerfile: Dockerfile
- use: buildx
goos: linux
goarch: arm64
dockerfile: ./Dockerfile
image_templates:
- "caddy/{{ .ProjectName }}:{{ .Tag }}-arm64v8"
build_flag_templates:
- "--platform=linux/arm64/v8"
- "--pull"
- "--label=org.opencontainers.image.created={{.Date}}"
- "--label=org.opencontainers.image.name={{.ProjectName}}"
- "--label=org.opencontainers.image.revision={{.FullCommit}}"
- "--label=org.opencontainers.image.version={{.Version}}"

docker_manifests:
- name_template: "caddy/ingress:{{ .Tag }}"
# https://goreleaser.com/customization/docker_manifest/
- name_template: caddy/{{ .ProjectName }}:latest
image_templates:
- "caddy/ingress:{{ .Tag }}-amd64"
- "caddy/ingress:{{ .Tag }}-arm64v8"
- caddy/{{ .ProjectName }}:{{ .Version }}-amd64
- caddy/{{ .ProjectName }}:{{ .Version }}-arm64v8
- name_template: caddy/{{ .ProjectName }}:{{ .Major }}
image_templates:
- caddy/{{ .ProjectName }}:{{ .Version }}-amd64
- caddy/{{ .ProjectName }}:{{ .Version }}-arm64v8
- name_template: caddy/{{ .ProjectName }}:{{ .Major }}.{{ .Minor }}
image_templates:
- caddy/{{ .ProjectName }}:{{ .Version }}-amd64
- caddy/{{ .ProjectName }}:{{ .Version }}-arm64v8
- name_template: caddy/{{ .ProjectName }}:{{ .Version }}
image_templates:
- caddy/{{ .ProjectName }}:{{ .Version }}-amd64
- caddy/{{ .ProjectName }}:{{ .Version }}-arm64v8

release:
disable: true

checksum:
name_template: "checksums.txt"
snapshot:
name_template: "{{ incpatch .Version }}-next"
changelog:
sort: asc
filters:
exclude:
- "^docs:"
- "^test:"
- "^ci:"

0 comments on commit 75990ce

Please sign in to comment.