@@ -10,6 +10,7 @@ before:
10
10
- ' {{ if not .IsSnapshot }}just generate-vcluster-latest-images {{ .Version }}{{ else }}echo "Skipping generate-vcluster-latest-images"{{ end }}'
11
11
- ' {{ if not .IsSnapshot }}just generate-vcluster-optional-images{{ else }}echo "Skipping generate-vcluster-optional-images"{{ end }}'
12
12
- ' {{ if not .IsSnapshot }}just generate-matrix-specific-images {{ .Version }}{{ else }}echo "Skipping generate-matrix-specific-images"{{ end }}'
13
+ - ' {{ if or .IsSnapshot (eq .Env.CI_BRANCH "main") }}echo "Building head images for main branch commit $(git rev-parse --short HEAD)"{{ end }}'
13
14
14
15
source :
15
16
format : tar.gz
@@ -182,6 +183,8 @@ dockers:
182
183
- ' {{ if eq .Prerelease "" }}ghcr.io/loft-sh/vcluster-oss:latest-amd64{{ end }}'
183
184
- ' {{ if eq .Prerelease "" }}ghcr.io/loft-sh/vcluster-oss:{{ .Major }}-amd64{{ end }}'
184
185
- ' {{ if eq .Prerelease "" }}ghcr.io/loft-sh/vcluster-oss:{{ .Major }}.{{ .Minor }}-amd64{{ end }}'
186
+ # Add head tag for main branch
187
+ - ' {{ if or .IsSnapshot (eq .Env.CI_BRANCH "main") }}ghcr.io/loft-sh/vcluster-oss:head-amd64{{ end }}'
185
188
use : buildx
186
189
dockerfile : Dockerfile.release
187
190
ids :
@@ -199,6 +202,8 @@ dockers:
199
202
- ' {{ if eq .Prerelease "" }}ghcr.io/loft-sh/vcluster-oss:latest-arm64v8{{ end }}'
200
203
- ' {{ if eq .Prerelease "" }}ghcr.io/loft-sh/vcluster-oss:{{ .Major }}-arm64v8{{ end }}'
201
204
- ' {{ if eq .Prerelease "" }}ghcr.io/loft-sh/vcluster-oss:{{ .Major }}.{{ .Minor }}-arm64v8{{ end }}'
205
+ # Add head tag for main branch
206
+ - ' {{ if or .IsSnapshot (eq .Env.CI_BRANCH "main") }}ghcr.io/loft-sh/vcluster-oss:head-arm64v8{{ end }}'
202
207
use : buildx
203
208
goarch : arm64
204
209
dockerfile : Dockerfile.release
@@ -303,6 +308,21 @@ docker_manifests:
303
308
- loftsh/vcluster-cli:{{ .Major }}-arm64v8
304
309
skip_push : auto
305
310
311
+ # --- Head multi arch manifest ---
312
+ - name_template : ghcr.io/loft-sh/vcluster-oss:head
313
+ image_templates :
314
+ - ghcr.io/loft-sh/vcluster-oss:head-amd64
315
+ - ghcr.io/loft-sh/vcluster-oss:head-arm64v8
316
+ # Only push on main branch
317
+ skip_push : ' {{ and (ne .Env.CI_BRANCH "main") (not .IsSnapshot) }}'
318
+
319
+ # --- Head multi arch manifest for vcluster-cli ---
320
+ - name_template : ghcr.io/loft-sh/vcluster-cli:head
321
+ image_templates :
322
+ - ghcr.io/loft-sh/vcluster-cli:head-amd64
323
+ - ghcr.io/loft-sh/vcluster-cli:head-arm64v8
324
+ # Only push on main branch
325
+ skip_push : ' {{ and (ne .Env.CI_BRANCH "main") (not .IsSnapshot) }}'
306
326
docker_signs :
307
327
- cmd : cosign
308
328
env :
0 commit comments