This commit is contained in:
parent
4e0a91235a
commit
9817e35967
2 changed files with 9 additions and 4 deletions
|
@ -369,9 +369,10 @@
|
||||||
script = pkgs.writeTextFile
|
script = pkgs.writeTextFile
|
||||||
{
|
{
|
||||||
name = "push-container";
|
name = "push-container";
|
||||||
text = ''
|
text = lib.concatStringsSep "\n" [
|
||||||
#!${pkgs.nushell}/bin/nu
|
"#!${pkgs.nushell}/bin/nu"
|
||||||
'' + (builtins.readFile ./push-container.nu);
|
(builtins.readFile ./push-container.nu)
|
||||||
|
];
|
||||||
executable = true;
|
executable = true;
|
||||||
};
|
};
|
||||||
in
|
in
|
||||||
|
|
|
@ -72,16 +72,20 @@ def main [
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
print "XXX"
|
||||||
$env.PLUGIN_PASSWORD | podman login --username $env.PLUGIN_USERNAME --password-stdin $env.PLUGIN_REGISTRY
|
$env.PLUGIN_PASSWORD | podman login --username $env.PLUGIN_USERNAME --password-stdin $env.PLUGIN_REGISTRY
|
||||||
|
print "YYY"
|
||||||
let old_image = (podman load --input $input | parse "Loaded image: {image}" | get 0.image)
|
let old_image = (podman load --input $input | parse "Loaded image: {image}" | get 0.image)
|
||||||
|
print "ZZZ"
|
||||||
print $old_image
|
print $old_image
|
||||||
podman images
|
podman images
|
||||||
$tags | each {
|
$tags | each {
|
||||||
|tag|
|
|tag|
|
||||||
let new_image = $"($env.PLUGIN_REGISTRY)/($env.PLUGIN_REPOSITORY):($tag)"
|
let new_image = $"($env.PLUGIN_REGISTRY)/($env.PLUGIN_REPOSITORY):($tag)"
|
||||||
|
print $new_image
|
||||||
podman tag $old_image $new_image
|
podman tag $old_image $new_image
|
||||||
podman push $new_image
|
podman push $new_image
|
||||||
}
|
}
|
||||||
podman images
|
podman images
|
||||||
podman logout "''${PLUGIN_REGISTRY}"
|
podman logout $env.PLUGIN_REGISTRY
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue