@@ -90,48 +90,11 @@ release:
90
90
mode : replace
91
91
92
92
# Docker 镜像配置
93
+ # FIXME: 等待 goreleaser 2.12 更新后使用 dockers_v2
93
94
dockers :
94
- # GitHub Container Registry
95
95
- image_templates :
96
96
- " ghcr.io/sjzar/chatlog:{{ .Tag }}-amd64"
97
- - " ghcr.io/sjzar/chatlog:latest-amd64"
98
- dockerfile : Dockerfile
99
- use : buildx
100
- goos : linux
101
- goarch : amd64
102
- build_flag_templates :
103
- - " --platform=linux/amd64"
104
- - " --label=org.opencontainers.image.title={{.ProjectName}}"
105
- - " --label=org.opencontainers.image.description=chat log tool, easily use your own chat data."
106
- - " --label=org.opencontainers.image.url=https://github.com/sjzar/chatlog"
107
- - " --label=org.opencontainers.image.source=https://github.com/sjzar/chatlog"
108
- - " --label=org.opencontainers.image.version={{.Version}}"
109
- - " --label=org.opencontainers.image.created={{.Date}}"
110
- - " --label=org.opencontainers.image.revision={{.FullCommit}}"
111
- - " --label=org.opencontainers.image.licenses=Apache-2.0"
112
-
113
- - image_templates :
114
- - " ghcr.io/sjzar/chatlog:{{ .Tag }}-arm64"
115
- - " ghcr.io/sjzar/chatlog:latest-arm64"
116
- dockerfile : Dockerfile
117
- use : buildx
118
- goos : linux
119
- goarch : arm64
120
- build_flag_templates :
121
- - " --platform=linux/arm64"
122
- - " --label=org.opencontainers.image.title={{.ProjectName}}"
123
- - " --label=org.opencontainers.image.description=chat log tool, easily use your own chat data."
124
- - " --label=org.opencontainers.image.url=https://github.com/sjzar/chatlog"
125
- - " --label=org.opencontainers.image.source=https://github.com/sjzar/chatlog"
126
- - " --label=org.opencontainers.image.version={{.Version}}"
127
- - " --label=org.opencontainers.image.created={{.Date}}"
128
- - " --label=org.opencontainers.image.revision={{.FullCommit}}"
129
- - " --label=org.opencontainers.image.licenses=Apache-2.0"
130
-
131
- # Docker Hub
132
- - image_templates :
133
97
- " sjzar/chatlog:{{ .Tag }}-amd64"
134
- - " sjzar/chatlog:latest-amd64"
135
98
dockerfile : Dockerfile
136
99
use : buildx
137
100
goos : linux
@@ -148,8 +111,8 @@ dockers:
148
111
- " --label=org.opencontainers.image.licenses=Apache-2.0"
149
112
150
113
- image_templates :
114
+ - " ghcr.io/sjzar/chatlog:{{ .Tag }}-arm64"
151
115
- " sjzar/chatlog:{{ .Tag }}-arm64"
152
- - " sjzar/chatlog:latest-arm64"
153
116
dockerfile : Dockerfile
154
117
use : buildx
155
118
goos : linux
@@ -172,17 +135,21 @@ docker_manifests:
172
135
image_templates :
173
136
- " ghcr.io/sjzar/chatlog:{{ .Tag }}-amd64"
174
137
- " ghcr.io/sjzar/chatlog:{{ .Tag }}-arm64"
175
- - name_template : " ghcr.io/sjzar/chatlog:latest"
176
- image_templates :
177
- - " ghcr.io/sjzar/chatlog:latest-amd64"
178
- - " ghcr.io/sjzar/chatlog:latest-arm64"
179
-
138
+
180
139
# Docker Hub manifests
181
140
- name_template : " sjzar/chatlog:{{ .Tag }}"
182
141
image_templates :
183
142
- " sjzar/chatlog:{{ .Tag }}-amd64"
184
143
- " sjzar/chatlog:{{ .Tag }}-arm64"
185
- - name_template : " sjzar/chatlog:latest"
144
+
145
+ # GitHub Container Registry latest
146
+ - name_template : " {{ if not .Prerelease }}ghcr.io/sjzar/chatlog:latest{{ end }}"
186
147
image_templates :
187
- - " sjzar/chatlog:latest-amd64"
188
- - " sjzar/chatlog:latest-arm64"
148
+ - " ghcr.io/sjzar/chatlog:{{ .Tag }}-amd64"
149
+ - " ghcr.io/sjzar/chatlog:{{ .Tag }}-arm64"
150
+
151
+ # Docker Hub latest
152
+ - name_template : " {{ if not .Prerelease }}sjzar/chatlog:latest{{ end }}"
153
+ image_templates :
154
+ - " sjzar/chatlog:{{ .Tag }}-amd64"
155
+ - " sjzar/chatlog:{{ .Tag }}-arm64"
0 commit comments