Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
OpenDAS
dynamo
Commits
ccf18b64
Unverified
Commit
ccf18b64
authored
Feb 19, 2026
by
Nate Mailhot
Committed by
GitHub
Feb 19, 2026
Browse files
fix: image size reporting (#6333)
parent
832bf80a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
29 additions
and
3 deletions
+29
-3
.github/actions/docker-remote-build/action.yml
.github/actions/docker-remote-build/action.yml
+29
-3
No files found.
.github/actions/docker-remote-build/action.yml
View file @
ccf18b64
...
@@ -176,6 +176,8 @@ runs:
...
@@ -176,6 +176,8 @@ runs:
-
name
:
Capture Build Metrics
-
name
:
Capture Build Metrics
id
:
metrics
id
:
metrics
shell
:
bash
shell
:
bash
env
:
AWS_DEFAULT_REGION
:
${{ inputs.aws_default_region }}
run
:
|
run
:
|
# Create metrics directory
# Create metrics directory
...
@@ -195,11 +197,34 @@ runs:
...
@@ -195,11 +197,34 @@ runs:
echo " End: ${BUILD_END_TIME}"
echo " End: ${BUILD_END_TIME}"
echo " Duration: ${BUILD_DURATION_SEC} seconds"
echo " Duration: ${BUILD_DURATION_SEC} seconds"
# Get image size
using docker inspect
# Get image size
IMAGE_TAG="${{ steps.build.outputs.image_tag }}"
IMAGE_TAG="${{ steps.build.outputs.image_tag }}"
IMAGE_SIZE_TYPE="unknown"
if [ -n "$IMAGE_TAG" ]; then
if [ -n "$IMAGE_TAG" ]; then
IMAGE_SIZE_BYTES=$(docker image inspect "$IMAGE_TAG" --format='{{.Size}}' 2>/dev/null || echo "0")
if [ "${{ inputs.no_load }}" == "false" ]; then
echo "📦 Image size: ${IMAGE_SIZE_BYTES} bytes"
# Image was loaded into local Docker daemon but not pushed; docker inspect
# reports uncompressed (virtual) size, which differs from the compressed
# registry size reported below
IMAGE_SIZE_BYTES=$(docker image inspect "$IMAGE_TAG" --format='{{.Size}}' 2>/dev/null || echo "0")
IMAGE_SIZE_TYPE="uncompressed"
elif [ "${{ inputs.push_image }}" == "true" ]; then
# Image was pushed to ECR without loading locally; query ECR for compressed size
REPO_NAME=$(echo "$IMAGE_TAG" | sed 's|.*amazonaws.com/||' | cut -d: -f1)
IMAGE_TAG_NAME=$(echo "$IMAGE_TAG" | cut -d: -f2-)
IMAGE_SIZE_BYTES=$(aws ecr describe-images \
--repository-name "$REPO_NAME" \
--image-ids "imageTag=${IMAGE_TAG_NAME}" \
--query 'imageDetails[0].imageSizeInBytes' \
--output text 2>/dev/null || echo "0")
# Treat empty or "None" response as 0
if [[ "$IMAGE_SIZE_BYTES" == "None" || -z "$IMAGE_SIZE_BYTES" ]]; then
IMAGE_SIZE_BYTES=0
fi
IMAGE_SIZE_TYPE="compressed"
else
IMAGE_SIZE_BYTES=0
fi
echo "📦 Image size: ${IMAGE_SIZE_BYTES} bytes (${IMAGE_SIZE_TYPE})"
else
else
IMAGE_SIZE_BYTES=0
IMAGE_SIZE_BYTES=0
echo "⚠️ No image tag available"
echo "⚠️ No image tag available"
...
@@ -223,6 +248,7 @@ runs:
...
@@ -223,6 +248,7 @@ runs:
"platform": "${{ inputs.platform }}",
"platform": "${{ inputs.platform }}",
"platform_arch": "${PLATFORM_ARCH}",
"platform_arch": "${PLATFORM_ARCH}",
"image_size_bytes": ${IMAGE_SIZE_BYTES},
"image_size_bytes": ${IMAGE_SIZE_BYTES},
"image_size_type": "${IMAGE_SIZE_TYPE}",
"build_start_time": "${BUILD_START_TIME}",
"build_start_time": "${BUILD_START_TIME}",
"build_end_time": "${BUILD_END_TIME}",
"build_end_time": "${BUILD_END_TIME}",
"build_duration_sec": ${BUILD_DURATION_SEC}
"build_duration_sec": ${BUILD_DURATION_SEC}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment