Skip to content

Commit

Permalink
update to .goreleaser.yaml to build arm64 and amd64 images, then crea…
Browse files Browse the repository at this point in the history
…te/push the manifest
  • Loading branch information
travisbcotton committed May 14, 2024
1 parent c83604c commit f3a4186
Showing 1 changed file with 49 additions and 11 deletions.
60 changes: 49 additions & 11 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ builds:
goos:
- linux
goarch:
- amd64
- arm64
no_unique_dist_dir: true
- amd64
no_unique_dist_dir: false
tags:
- dynamic
- id: bss-init
Expand All @@ -27,29 +27,69 @@ builds:
goarch:
- amd64
- arm64
no_unique_dist_dir: true
no_unique_dist_dir: false
tags:
- dynamic

dockers:
-
image_templates:
- ghcr.io/openchami/{{.ProjectName}}:latest
- ghcr.io/openchami/{{.ProjectName}}:{{ .Tag }}
- ghcr.io/openchami/{{.ProjectName}}:{{ .Major }}
- ghcr.io/openchami/{{.ProjectName}}:{{ .Major }}.{{ .Minor }}
- image_templates:
- ghcr.io/openchami/{{.ProjectName}}:latest-amd64
- ghcr.io/openchami/{{.ProjectName}}:{{ .Tag }}-amd64
- ghcr.io/openchami/{{.ProjectName}}:{{ .Major }}-amd64
- ghcr.io/openchami/{{.ProjectName}}:{{ .Major }}.{{ .Minor }}-amd64
build_flag_templates:
- "--pull"
- "--platform=linux/amd64"
- "--label=org.opencontainers.image.created={{.Date}}"
- "--label=org.opencontainers.image.title={{.ProjectName}}"
- "--label=org.opencontainers.image.revision={{.FullCommit}}"
- "--label=org.opencontainers.image.version={{.Version}}"
goarch: amd64
use: buildx
extra_files:
- LICENSE
- CHANGELOG.md
- README.md
- .version
- migrations/
- image_templates:
- ghcr.io/openchami/{{.ProjectName}}:latest-arm64
- ghcr.io/openchami/{{.ProjectName}}:{{ .Tag }}-arm64
- ghcr.io/openchami/{{.ProjectName}}:{{ .Major }}-arm64
- ghcr.io/openchami/{{.ProjectName}}:{{ .Major }}.{{ .Minor }}-arm64
build_flag_templates:
- "--pull"
- "--platform=linux/arm64"
- "--label=org.opencontainers.image.created={{.Date}}"
- "--label=org.opencontainers.image.title={{.ProjectName}}"
- "--label=org.opencontainers.image.revision={{.FullCommit}}"
- "--label=org.opencontainers.image.version={{.Version}}"
goarch: arm64
use: buildx
extra_files:
- LICENSE
- CHANGELOG.md
- README.md
- .version
- migrations/

docker_manifests:
- name_template: 'ghcr.io/openchami/{{.ProjectName}}:latest'
image_templates:
- 'ghcr.io/openchami/{{.ProjectName}}:latest-amd64'
- 'ghcr.io/openchami/{{.ProjectName}}:latest-arm64'
- name_template: 'ghcr.io/openchami/{{.ProjectName}}:{{ .Tag }}'
image_templates:
- 'ghcr.io/openchami/{{.ProjectName}}:{{ .Tag }}-amd64'
- 'ghcr.io/openchami/{{.ProjectName}}:{{ .Tag }}-arm64'
- name_template: 'ghcr.io/openchami/{{.ProjectName}}:{{ .Major }}'
image_templates:
- 'ghcr.io/openchami/{{.ProjectName}}:{{ .Major }}-amd64'
- 'ghcr.io/openchami/{{.ProjectName}}:{{ .Major }}-arm64'
- name_template: 'ghcr.io/openchami/{{.ProjectName}}:{{ .Major }}.{{ .Minor }}'
image_templates:
- 'ghcr.io/openchami/{{.ProjectName}}:{{ .Major }}.{{ .Minor }}-amd64'
- 'ghcr.io/openchami/{{.ProjectName}}:{{ .Major }}.{{ .Minor }}-arm64'

archives:
- format: tar.gz
Expand All @@ -66,7 +106,6 @@ archives:
- CHANGELOG.md
- README.md


checksum:
name_template: 'checksums.txt'
snapshot:
Expand All @@ -78,7 +117,6 @@ changelog:
- '^docs:'
- '^test:'


# The lines beneath this are called `modelines`. See `:help modeline`
# Feel free to remove those if you don't want/use them.
# yaml-language-server: $schema=https://goreleaser.com/static/schema.json
Expand Down

0 comments on commit f3a4186

Please sign in to comment.