flake-update-diff/utils/fetch-docker.sh
ahuston-0 407c5f07a7
Some checks failed
Check flake.lock / Check health of `flake.lock` (pull_request) Successful in 8s
Check Nix flake / Build nix outputs (ubuntu-latest) (pull_request) Failing after 1m19s
Check Nix flake / Perform Nix flake checks (ubuntu-latest) (pull_request) Failing after 1m20s
Check Nix formatting / Perform Nix format checks (pull_request) Failing after 1m19s
remove wheel preference, add CI
2025-03-18 15:31:05 -04:00

24 lines
760 B
Bash
Executable File

#!/usr/bin/env nix
#! nix shell nixpkgs#bash nixpkgs#nix-prefetch-docker --command bash
# retrieves the latest image tags
set -x
set -v
set -e
script_path=$(dirname "$(readlink -f $0)")
parent_path=$(dirname "$script_path")
# a list of images to pull
# relpath is the relative path to the parent_path where you want the file written
# format: <image name>,<image tag>,<image architecture>,<os>,<relpath>
images=(
"nextcloud,apache,amd64,linux,/systems/palatine-hill/docker/nextcloud-image/nextcloud-apache.nix"
)
IFS=","
while read -r name tag arch os relpath; do
nix-prefetch-docker --image-name "$name" --image-tag "$tag" --arch "$arch" --os "$os" --quiet >"$parent_path/$relpath"
git --no-pager diff "$parent_path/$relpath"
done <<<"${images[@]}"