refactor(docker): use rec for imageName in image files
All checks were successful
Discord / discord commits (push) Has been skipped

This commit is contained in:
matt1432 2024-10-05 12:40:10 -04:00
parent 82a05091a5
commit 559d9e0fbd
2 changed files with 4 additions and 3 deletions

View file

@ -1,8 +1,8 @@
pkgs:
pkgs.dockerTools.pullImage {
pkgs.dockerTools.pullImage rec {
imageName = "some/image/name";
imageDigest = "";
sha256 = "";
finalImageName = "";
finalImageName = imageName;
finalImageTag = "latest";
}

View file

@ -25,7 +25,8 @@ writeShellApplication {
if [[ "$CURRENT_DIGEST" != "$NEW_DIGEST" ]]; then
echo -e " $output:\n $CURRENT_DIGEST\n $NEW_DIGEST\n"
PREFETCH=$(nix-prefetch-docker "$IMAGE" "$TAG")
echo -e "pkgs:\npkgs.dockerTools.pullImage $PREFETCH" > "$FILE"
echo -e "pkgs:\npkgs.dockerTools.pullImage rec $PREFETCH" > "$FILE"
sed -i 's/finalImageName.*/finalImageName = imageName;/' "$FILE"
fi
fi
'';