I have created make release process with the help of gorelaeser . But in my case I need to build and push image to ECR. Currently before building image I'm login to ecr and then building image but don't know how to push image via gorelaeser.
.goreleaser.yml
dockers:
goos: linux
goarch: amd64
image_templates:
- "myuser/myimage:latest"
- "myuser/myimage:{{ .Tag }}"
- "myuser/myimage:{{ .Tag }}-{{ .Env.GO_VERSION }}"
- "myuser/myimage:v{{ .Major }}"
- "gcr.io/myuser/myimage:latest"
skip_push: false
dockerfile: Dockerfile
use: docker
build_flag_templates:
- "--build-arg=FOO={{.Env.Bar}}"
- "--platform=linux/arm64
push_flags:
- --tls-verify=false
Tried changing skip_push value to true also
GoReleaser will push the images automatically in the end of the process if you run
goreleaser release, provided thatdockeris authorized to do so.GoReleaser does not push if you're running
goreleaser buildorgoreleaser release --snapshotthough, so maybe you're doing one of these?