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
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:
@@ -167,7 +167,7 @@ jobs:
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
generate-build-info:
|
generate-build-info:
|
||||||
needs: generate-changelogs
|
# needs: generate-changelogs
|
||||||
runs-on: docker-build
|
runs-on: docker-build
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
@@ -188,8 +188,22 @@ jobs:
|
|||||||
|
|
||||||
image="gitea.fithwum.tech/fithwum/debian-base:$version"
|
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")
|
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" \
|
jq -n --arg version "$version" \
|
||||||
--arg commit "$(git rev-parse HEAD)" \
|
--arg commit "$(git rev-parse HEAD)" \
|
||||||
|
|||||||
Reference in New Issue
Block a user