test build info update & changelog 5
All checks were successful
Build, Upload RootFS, and Push Docker Images, update changelog, update build info. / build-and-push-rootfs-archives (push) Successful in 12m20s
Build, Upload RootFS, and Push Docker Images, update changelog, update build info. / generate-changelogs (push) Successful in 2m51s
Build, Upload RootFS, and Push Docker Images, update changelog, update build info. / build-and-push-docker-images (push) Successful in 3m22s
Build, Upload RootFS, and Push Docker Images, update changelog, update build info. / generate-build-info (push) Successful in 1m49s

This commit is contained in:
2025-07-09 11:59:55 -07:00
parent eda845fb3b
commit 572f2ab77d

View File

@@ -273,17 +273,25 @@ jobs:
infofile="$version/build-info.json" infofile="$version/build-info.json"
image="gitea.fithwum.tech/fithwum/debian-base:$version" image="gitea.fithwum.tech/fithwum/debian-base:$version"
# Pull image before inspecting to ensure metadata is available
if ! docker pull "$image"; then
echo "[WARN] Failed to pull $image — setting fields to 'unknown/0'"
digest="unknown"
size_bytes=0
else
digest=$(docker inspect --format='{{if .RepoDigests}}{{index .RepoDigests 0}}{{else}}unknown{{end}}' "$image" 2>/dev/null || echo "unknown") digest=$(docker inspect --format='{{if .RepoDigests}}{{index .RepoDigests 0}}{{else}}unknown{{end}}' "$image" 2>/dev/null || echo "unknown")
size_bytes=$(docker image inspect "$image" --format='{{.Size}}' 2>/dev/null || echo "0") size_bytes=$(docker image inspect "$image" --format='{{.Size}}' 2>/dev/null || echo "0")
size_bytes=${size_bytes//[^0-9]/} size_bytes=${size_bytes//[^0-9]/}
[[ -z "$size_bytes" ]] && size_bytes=0 if [[ -z "$size_bytes" ]]; then size_bytes=0; fi
fi
size_human=$(human_size "$size_bytes") size_human=$(human_size "$size_bytes")
sha256="unknown" # Load SHA256 from file if available
if [[ -f ../sha256sums.txt ]]; then SHA256=$(grep "$version/debian-$version.tar.bz2" ../sha256sums.txt | awk '{print $1}')
sha256=$(grep "$version/debian-$version.tar.bz2" ../sha256sums.txt | awk '{print $1}') if [[ -z "$SHA256" ]]; then
[[ -z "$sha256" ]] && sha256="unknown" SHA256="unknown"
fi fi
jq -n \ jq -n \