File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3030 pkgs . skopeo
3131 pkgs . gh
3232 pkgs . gitMinimal
33+ pkgs . jujutsu
3334 ] ;
3435 text = ''
3536 system="'' ${1:?usage: push-image <x86_64-linux>}"
@@ -53,14 +54,18 @@ rec {
5354 "docker-archive:dist/computer.exe.$system.tar.gz" \
5455 "docker://$image:$tag"
5556
56- # Publish the commit tag used by the deployment workflow. A single-arch
57- # image needs no manifest list.
57+ # Publish the commit tags used by deployment. A single-arch image needs
58+ # no manifest list, but it still needs both the Git and jj revision tags.
59+ jj root >/dev/null 2>&1 || jj git init --colocate
5860 git_sha="$(git rev-parse --short HEAD)"
59- skopeo --insecure-policy copy \
60- --src-creds "$ghcr_user:$ghcr_token" \
61- --dest-creds "$ghcr_user:$ghcr_token" \
62- "docker://$image:$tag" \
63- "docker://$image:$git_sha"
61+ jj_rev="$(jj log --no-graph -r '@' -T 'change_id.short()')"
62+ for revision in "$git_sha" "$jj_rev"; do
63+ skopeo --insecure-policy copy \
64+ --src-creds "$ghcr_user:$ghcr_token" \
65+ --dest-creds "$ghcr_user:$ghcr_token" \
66+ "docker://$image:$tag" \
67+ "docker://$image:$revision"
68+ done
6469 '' ;
6570 } ;
6671
You can’t perform that action at this time.
0 commit comments