File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed
Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change 7474
7575 - name : Test image size
7676 run : |
77- set -euxo pipefail
77+ set -euo pipefail
7878
7979 # Check Docker image size against limits
8080 # Usage: check_image_size <image_name> <max_size_str>
@@ -112,11 +112,15 @@ jobs:
112112
113113 # Check image size - capture return code, not output
114114 check_image_size "glim-test" "100M"
115+
116+ # Handle return code
115117 if [ $? -ge 1 ]; then
116118 echo "::error::Image is too large"
117119 exit 1
118120 elif [ $? -eq 2 ]; then
119121 echo "::warning::Image is within 10% of the limit"
122+ exit 0 # required, otherwise the function call above will provide the exit code '2'
120123 elif [ $? -eq -1 ]; then
121124 echo "::warning::Image size check failed"
125+ exit 1
122126 fi
You can’t perform that action at this time.
0 commit comments