Skip to content

Commit

Permalink
asdf
Browse files Browse the repository at this point in the history
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
  • Loading branch information
caarlos0 committed Oct 8, 2024
1 parent b86bab8 commit 25a9517
Show file tree
Hide file tree
Showing 2 changed files with 55 additions and 5 deletions.
35 changes: 30 additions & 5 deletions .goreleaser.docker.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,33 @@
# yaml-language-server: $schema=https://goreleaser.com/static/schema-pro.json
# vim: set ts=2 sw=2 tw=0 fo=jcroql

version: 2
project_name: foo

builds:
- main: .
binary: foo
goos: [linux]
goarch:
- arm64
- amd64

dockers:
- goos: linux
goarch: amd64
image_templates:
- "caarlos0/foo:true"
dockerfile: true.Dockerfile
- goos: linux
goarch: amd64
image_templates:
- "caarlos0/foo:{{.Tag}}-amd64"
build_flag_templates:
- --pull
- "--label=org.opencontainers.image.title={{ .ProjectName }}"
- "--build-arg=VERSION={{.Version}}"
- "--build-arg=COMMIT_HASH={{.FullCommit}}"
- "--build-arg=BUILD_DATE={{.Date}}"
dockerfile: Dockerfile.foo

docker_manifests:
- name_template: "caarlos0/foo:{{ .Version }}"
create_flags:
- "--annotation=com.gitlab.ci.user.name=test"
image_templates:
- "caarlos0/foo:{{ .Version }}-amd64"
25 changes: 25 additions & 0 deletions .goreleaser.ko.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# .goreleaser.yml
before:
hooks:
- go mod tidy

builds:
- env: ["CGO_ENABLED=1"]
binary: test
goos:
- darwin
- linux
goarch:
- amd64
- arm64

kos:
- repository: ghcr.io/caarlos0/test-ko
tags:
- "{{.Version}}"
- latest
bare: true
preserve_import_paths: false
platforms:
- linux/amd64
- linux/arm64

0 comments on commit 25a9517

Please sign in to comment.