From 0bedc368e3c50a58468411145da9ee8acb0656cd Mon Sep 17 00:00:00 2001 From: Patrick D'appollonio <930925+patrickdappollonio@users.noreply.github.com> Date: Mon, 3 Jun 2024 21:09:20 -0400 Subject: [PATCH] Add ARM builds. --- .goreleaser.yml | 70 +++++++++++++++++++++++++++++++++++++++++++------ README.md | 4 +-- 2 files changed, 64 insertions(+), 10 deletions(-) diff --git a/.goreleaser.yml b/.goreleaser.yml index 24b2723..e89adf0 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -15,21 +15,75 @@ builds: - -trimpath ldflags: - -s -w -X main.version={{.Version}} -extldflags "-static" + mod_timestamp: "{{ .CommitTimestamp }}" archives: - - replacements: - 386: i386 - amd64: x86_64 + - name_template: >- + {{ .ProjectName }}_ + {{- tolower .Os }}_ + {{- if eq .Arch "amd64" }}x86_64 + {{- else if eq .Arch "386" }}i386 + {{- else }}{{ .Arch }} + {{- end }} + format_overrides: + - goos: windows + format: zip checksum: - name_template: 'checksums.txt' + name_template: "checksums.txt" snapshot: name_template: "{{ incpatch .Version }}-next" dockers: - image_templates: - - "ghcr.io/patrickdappollonio/wait-for:{{ .Tag }}" - - "ghcr.io/patrickdappollonio/wait-for:latest" + - "ghcr.io/patrickdappollonio/wait-for:{{ .Tag }}-amd64" + goos: linux + goarch: amd64 + use: buildx + build_flag_templates: + - "--platform=linux/amd64" + - "--label=org.opencontainers.image.title={{ .ProjectName }}" + - "--label=org.opencontainers.image.description={{ .ProjectName }} version {{ .Version }}. See release notes at https://github.com/patrickdappollonio/{{ .ProjectName }}/releases/tag/v{{ .RawVersion }}" + - "--label=org.opencontainers.image.url=https://github.com/patrickdappollonio/{{ .ProjectName }}" + - "--label=org.opencontainers.image.source=https://github.com/patrickdappollonio/{{ .ProjectName }}" + - "--label=org.opencontainers.image.version={{ .Version }}" + - '--label=org.opencontainers.image.created={{ time "2006-01-02T15:04:05Z07:00" }}' + - "--label=org.opencontainers.image.revision={{ .FullCommit }}" + skip_push: true + - image_templates: + - "ghcr.io/patrickdappollonio/wait-for:{{ .Tag }}-arm64" + goos: linux + goarch: arm64 + use: buildx + build_flag_templates: + - "--platform=linux/arm64" + - "--label=org.opencontainers.image.title={{ .ProjectName }}" + - "--label=org.opencontainers.image.description={{ .ProjectName }} version {{ .Version }}. See release notes at https://github.com/patrickdappollonio/{{ .ProjectName }}/releases/tag/v{{ .RawVersion }}" + - "--label=org.opencontainers.image.url=https://github.com/patrickdappollonio/{{ .ProjectName }}" + - "--label=org.opencontainers.image.source=https://github.com/patrickdappollonio/{{ .ProjectName }}" + - "--label=org.opencontainers.image.version={{ .Version }}" + - '--label=org.opencontainers.image.created={{ time "2006-01-02T15:04:05Z07:00" }}' + - "--label=org.opencontainers.image.revision={{ .FullCommit }}" + skip_push: true +docker_manifests: + - name_template: "ghcr.io/patrickdappollonio/wait-for:v{{ .RawVersion }}" + image_templates: + - "ghcr.io/patrickdappollonio/wait-for:{{ .Tag }}-amd64" + - "ghcr.io/patrickdappollonio/wait-for:{{ .Tag }}-arm64" + - name_template: "ghcr.io/patrickdappollonio/wait-for:v{{ .Major }}" + image_templates: + - "ghcr.io/patrickdappollonio/wait-for:{{ .Tag }}-amd64" + - "ghcr.io/patrickdappollonio/wait-for:{{ .Tag }}-arm64" + - name_template: "ghcr.io/patrickdappollonio/wait-for:latest" + image_templates: + - "ghcr.io/patrickdappollonio/wait-for:{{ .Tag }}-amd64" + - "ghcr.io/patrickdappollonio/wait-for:{{ .Tag }}-arm64" changelog: sort: asc filters: exclude: - - '^docs:' - - '^test:' + - "^docs:" + - "^test:" + groups: + - title: "Fixes, improvements and updates" + order: 1 + - title: "Dependency updates" + regexp: "^Bump .* from .* to .*$" # dependabot + order: 999 diff --git a/README.md b/README.md index a517e24..df335c7 100644 --- a/README.md +++ b/README.md @@ -59,9 +59,9 @@ spec: image: ghcr.io/patrickdappollonio/wait-for:latest env: - name: POSTGRES_HOST - value: "postgres.default.svc.cluster.local:5432" + value: "postgres.default.svc.cluster.local:5432" command: - - /wait-for + - /wait-for args: - --host="google.com:443" - --host="mysql.example.com:3306"