Skip to content

Commit

Permalink
ci: ensure only one amd64/arm build is pushed for a pre-release tag
Browse files Browse the repository at this point in the history
Signed-off-by: Bradley Jones <[email protected]>
  • Loading branch information
bradleyjones committed May 28, 2024
1 parent 0752453 commit cbae0c1
Showing 1 changed file with 32 additions and 2 deletions.
34 changes: 32 additions & 2 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@ changelog:
dockers:
- image_templates:
- "anchore/k8s-inventory:latest"
- "anchore/k8s-inventory:{{ .Tag }}-amd64"
- "anchore/k8s-inventory:v{{ .Major }}-amd64"
- "anchore/k8s-inventory:v{{ .Major }}.{{ .Minor }}-amd64"
dockerfile: Dockerfile
Expand All @@ -80,9 +79,22 @@ dockers:
- "--build-arg=BUILD_VERSION={{.Version}}"
- "--build-arg=VCS_REF={{.FullCommit}}"
- "--build-arg=VCS_URL={{.GitURL}}"
skip_push: auto

- image_templates:
- "anchore/k8s-inventory:{{ .Tag }}-amd64"
dockerfile: Dockerfile
use: buildx
ids:
- generic
build_flag_templates:
- "--platform=linux/amd64"
- "--build-arg=BUILD_DATE={{.Date}}"
- "--build-arg=BUILD_VERSION={{.Version}}"
- "--build-arg=VCS_REF={{.FullCommit}}"
- "--build-arg=VCS_URL={{.GitURL}}"

- image_templates:
- "anchore/k8s-inventory:{{ .Tag }}-arm64v8"
- "anchore/k8s-inventory:v{{ .Major }}-arm64v8"
- "anchore/k8s-inventory:v{{ .Major }}.{{ .Minor }}-arm64v8"
goarch: arm64
Expand All @@ -96,6 +108,21 @@ dockers:
- "--build-arg=BUILD_VERSION={{.Version}}"
- "--build-arg=VCS_REF={{.FullCommit}}"
- "--build-arg=VCS_URL={{.GitURL}}"
skip_push: auto

- image_templates:
- "anchore/k8s-inventory:{{ .Tag }}-arm64v8"
goarch: arm64
dockerfile: Dockerfile
use: buildx
ids:
- generic
build_flag_templates:
- "--platform=linux/arm64/v8"
- "--build-arg=BUILD_DATE={{.Date}}"
- "--build-arg=BUILD_VERSION={{.Version}}"
- "--build-arg=VCS_REF={{.FullCommit}}"
- "--build-arg=VCS_URL={{.GitURL}}"

- image_templates:
- "anchore/k8s-inventory:{{ .Tag }}-fips-amd64"
Expand All @@ -109,6 +136,7 @@ dockers:
- "--build-arg=BUILD_VERSION={{.Version}}"
- "--build-arg=VCS_REF={{.FullCommit}}"
- "--build-arg=VCS_URL={{.GitURL}}"
skip_push: auto

docker_manifests:
- name_template: anchore/k8s-inventory:{{ .Tag }}
Expand All @@ -120,6 +148,7 @@ docker_manifests:
- anchore/k8s-inventory:{{ .Tag }}-arm64v8
- anchore/k8s-inventory:v{{ .Major }}-arm64v8
- anchore/k8s-inventory:v{{ .Major }}.{{ .Minor }}-arm64v8
skip_push: auto
- name_template: anchore/k8s-inventory:latest
image_templates:
- anchore/k8s-inventory:{{ .Tag }}-amd64
Expand All @@ -129,4 +158,5 @@ docker_manifests:
- anchore/k8s-inventory:{{ .Tag }}-arm64v8
- anchore/k8s-inventory:v{{ .Major }}-arm64v8
- anchore/k8s-inventory:v{{ .Major }}.{{ .Minor }}-arm64v8
skip_push: auto

0 comments on commit cbae0c1

Please sign in to comment.