Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
chore: use ko to build the docker images as recommended by goreleaser
Signed-off-by: Chris Privitere <[email protected]>
  • Loading branch information
cprivitere committed Jan 31, 2024
commit ed414a02622eb6424654c9e6853c818c3b985c0a
48 changes: 32 additions & 16 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ builds:
- CGO_ENABLED=0
binary: metal
ldflags:
- -X github.com/equinix/metal-cli/cmd.Version={{.Version}}
- -X github.com/equinix/metal-cli/cmd.Build=${.Commit}"
- -X github.com/equinix/{{ .ProjectName }}/cmd.Version={{.Version}}
- -X github.com/equinix/{{ .ProjectName }}/cmd.Build=${.Commit}"

goos:
- freebsd
Expand All @@ -34,7 +34,7 @@ archives:
checksum:
name_template: "{{ .ProjectName }}_{{ .Version }}_checksums.txt"
release:
name_template: "{{.ProjectName}}-v{{.Version}}"
name_template: "{{ .ProjectName }}-v{{ .Version }}"
snapshot:
name_template: "{{ .Tag }}-next"
changelog:
Expand All @@ -58,16 +58,32 @@ brews:
owner: equinix
name: homebrew-tap

dockers:
- image_templates:
- "ghcr.io/{{ .Env.GITHUB_REPOSITORY }}:{{ .Tag }}-{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}"
dockerfile: Dockerfile
use: buildx
build_flag_templates:
- "--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}}"
- "--label=org.opencontainers.image.source={{.GitURL}}"
- "--platform=linux/{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}"
kos:
- repository: ghcr.io/equinix/{{ .ProjectName }}
tags:
- "{{ .Tag }}"
- "{{ .Major }}.{{ .Minor }}"
- "{{ .Minor}}"
- latest
platforms:
- linux/amd64
- linux/arm64
- linux/arm/v7
- linux/arm/v6
- freebsd/amd64
- freebsd/arm64
- freebsd/arm/v7
- freebsd/arm/v6
- windows/amd64
- windows/arm64
- windows/arm/v7
- windows/arm/v6
- darwin/amd64
- darwin/arm64
sbom: spdx

sboms:
- artifacts: archive

docker_signs:
- artifacts: manifests
25 changes: 0 additions & 25 deletions Dockerfile

This file was deleted.