size test
Some checks failed
Build, Upload RootFS, and Push Docker Images, update changelog, update build info. / build-rootfs-archives (push) Successful in 6m36s
Build, Upload RootFS, and Push Docker Images, update changelog, update build info. / generate-build-info (push) Failing after 55s
Build, Upload RootFS, and Push Docker Images, update changelog, update build info. / push-archives-to-repo (push) Successful in 58s
Build, Upload RootFS, and Push Docker Images, update changelog, update build info. / build-and-push-docker-images (push) Has been skipped
Build, Upload RootFS, and Push Docker Images, update changelog, update build info. / generate-changelogs (push) Has been skipped

This commit is contained in:
2025-07-06 04:51:54 -07:00
parent e7f1f0f571
commit c204d9e283

View File

@@ -167,7 +167,7 @@ jobs:
fi
generate-build-info:
needs: generate-changelogs
# needs: generate-changelogs
runs-on: docker-build
steps:
@@ -188,8 +188,22 @@ jobs:
image="gitea.fithwum.tech/fithwum/debian-base:$version"
human_size() {
b=$1
d=''
s=0
S=(B KB MB GB TB)
while ((b >= 1024 && s < ${#S[@]}-1)); do
d=$((b % 1024))
b=$((b / 1024))
s=$((s + 1))
done
printf "%s%s\n" "$b" "${S[$s]}"
}
digest=$(docker inspect --format='{{index .RepoDigests 0}}' "$image" || echo "unknown")
size=$(docker image inspect "$image" --format='{{.Size}}' || echo "0")
size_bytes=$(docker image inspect "$image" --format='{{.Size}}' || echo "0")
size_human=$(human_size "$size_bytes")
jq -n --arg version "$version" \
--arg commit "$(git rev-parse HEAD)" \