Skip to content

Commit 9f62930

Browse files
kashallsitzg
andauthored
Add support for ghcr.io image tags (#383)
Co-authored-by: Geoff Bourne <itzgeoff@gmail.com>
1 parent 0868f04 commit 9f62930

File tree

4 files changed

+67
-14
lines changed

4 files changed

+67
-14
lines changed

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
release:
1111
uses: itzg/github-workflows/.github/workflows/go-with-releaser-image.yml@main
1212
with:
13-
go-version: "1.24.1"
13+
go-version: "1.24.2"
1414
secrets:
1515
image-registry-username: ${{ secrets.DOCKERHUB_USERNAME }}
1616
image-registry-password: ${{ secrets.DOCKERHUB_TOKEN }}

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,4 @@ jobs:
1111
build:
1212
uses: itzg/github-workflows/.github/workflows/go-test.yml@main
1313
with:
14-
go-version: "1.24.1"
14+
go-version: "1.24.2"

.goreleaser.yml

Lines changed: 64 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@ release:
66
before:
77
hooks:
88
- go mod download
9-
brews:
10-
- install: |
11-
bin.install "mc-router"
129
builds:
13-
- goos:
10+
- id: mc-router
11+
main: ./cmd/mc-router
12+
binary: mc-router
13+
goos:
1414
- linux
1515
- darwin
1616
- windows
@@ -19,14 +19,12 @@ builds:
1919
- arm64
2020
- arm
2121
goarm:
22-
- 6
22+
- "6"
2323
ignore:
2424
- goos: windows
2525
goarch: arm
2626
- goos: windows
2727
goarch: arm64
28-
main: ./cmd/mc-router
29-
binary: mc-router
3028
env:
3129
- CGO_ENABLED=0
3230
archives:
@@ -40,22 +38,28 @@ archives:
4038
- README*
4139
snapshot:
4240
name_template: SNAPSHOT-{{ .ShortCommit }}
41+
brews:
42+
- install: |
43+
bin.install "mc-router"
4344
dockers:
4445
- image_templates:
4546
- "itzg/{{ .ProjectName }}:{{ .Version }}-amd64"
47+
- "itzg/{{ .ProjectName }}:latest-amd64"
4648
dockerfile: Dockerfile.release
4749
goarch: amd64
50+
use: buildx
4851
build_flag_templates:
4952
- --platform
5053
- linux/amd64
5154
- --load
5255
- --label=org.opencontainers.image.version={{ .Version }}
5356
- --label=org.opencontainers.image.revision={{ .FullCommit }}
54-
5557
- image_templates:
5658
- "itzg/{{ .ProjectName }}:{{ .Version }}-arm64"
59+
- "itzg/{{ .ProjectName }}:latest-arm64"
5760
dockerfile: Dockerfile.release
5861
goarch: arm64
62+
use: buildx
5963
build_flag_templates:
6064
- --platform
6165
- linux/arm64
@@ -64,9 +68,48 @@ dockers:
6468
- --label=org.opencontainers.image.revision={{ .FullCommit }}
6569
- image_templates:
6670
- "itzg/{{ .ProjectName }}:{{ .Version }}-arm32v6"
71+
- "itzg/{{ .ProjectName }}:latest-arm32v6"
72+
dockerfile: Dockerfile.release
73+
goarch: arm
74+
goarm: "6"
75+
use: buildx
76+
build_flag_templates:
77+
- --platform
78+
- linux/arm/v6
79+
- --load
80+
- --label=org.opencontainers.image.version={{ .Version }}
81+
- --label=org.opencontainers.image.revision={{ .FullCommit }}
82+
- image_templates:
83+
- "ghcr.io/itzg/{{ .ProjectName }}:{{ .Version }}-amd64"
84+
- "ghcr.io/itzg/{{ .ProjectName }}:latest-amd64"
85+
dockerfile: Dockerfile.release
86+
goarch: amd64
87+
use: buildx
88+
build_flag_templates:
89+
- --platform
90+
- linux/amd64
91+
- --load
92+
- --label=org.opencontainers.image.version={{ .Version }}
93+
- --label=org.opencontainers.image.revision={{ .FullCommit }}
94+
- image_templates:
95+
- "ghcr.io/itzg/{{ .ProjectName }}:{{ .Version }}-arm64"
96+
- "ghcr.io/itzg/{{ .ProjectName }}:latest-arm64"
97+
dockerfile: Dockerfile.release
98+
goarch: arm64
99+
use: buildx
100+
build_flag_templates:
101+
- --platform
102+
- linux/arm64
103+
- --load
104+
- --label=org.opencontainers.image.version={{ .Version }}
105+
- --label=org.opencontainers.image.revision={{ .FullCommit }}
106+
- image_templates:
107+
- "ghcr.io/itzg/{{ .ProjectName }}:{{ .Version }}-arm32v6"
108+
- "ghcr.io/itzg/{{ .ProjectName }}:latest-arm32v6"
67109
dockerfile: Dockerfile.release
68110
goarch: arm
69111
goarm: "6"
112+
use: buildx
70113
build_flag_templates:
71114
- --platform
72115
- linux/arm/v6
@@ -82,9 +125,19 @@ docker_manifests:
82125
- "itzg/{{ .ProjectName }}:{{ .Version }}-arm32v6"
83126
- name_template: "itzg/{{ .ProjectName }}:latest"
84127
image_templates:
85-
- "itzg/{{ .ProjectName }}:{{ .Version }}-amd64"
86-
- "itzg/{{ .ProjectName }}:{{ .Version }}-arm64"
87-
- "itzg/{{ .ProjectName }}:{{ .Version }}-arm32v6"
128+
- "itzg/{{ .ProjectName }}:latest-amd64"
129+
- "itzg/{{ .ProjectName }}:latest-arm64"
130+
- "itzg/{{ .ProjectName }}:latest-arm32v6"
131+
- name_template: "ghcr.io/itzg/{{ .ProjectName }}:{{ .Version }}"
132+
image_templates:
133+
- "ghcr.io/itzg/{{ .ProjectName }}:{{ .Version }}-amd64"
134+
- "ghcr.io/itzg/{{ .ProjectName }}:{{ .Version }}-arm64"
135+
- "ghcr.io/itzg/{{ .ProjectName }}:{{ .Version }}-arm32v6"
136+
- name_template: "ghcr.io/itzg/{{ .ProjectName }}:latest"
137+
image_templates:
138+
- "ghcr.io/itzg/{{ .ProjectName }}:latest-amd64"
139+
- "ghcr.io/itzg/{{ .ProjectName }}:latest-arm64"
140+
- "ghcr.io/itzg/{{ .ProjectName }}:latest-arm32v6"
88141
changelog:
89142
filters:
90143
exclude:

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ module github.com/itzg/mc-router
22

33
go 1.23.0
44

5-
toolchain go1.24.1
5+
toolchain go1.24.2
66

77
require (
88
github.com/go-kit/kit v0.13.0

0 commit comments

Comments
 (0)