Skip to content

Commit

Permalink
image size check should fail
Browse files Browse the repository at this point in the history
  • Loading branch information
gauravsaini04 committed May 8, 2024
1 parent 874a2af commit 79374f3
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion .github/actions/smoke-test/check-image-size.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
#!/bin/bash

set -e

# Function to handle errors
handle_error() {
local exit_code=$?
Expand All @@ -8,7 +11,6 @@ handle_error() {
exit $exit_code
}
trap 'handle_error $LINENO ${BASH_COMMAND%% *}' ERR
echo "This is line $LINENO"

convert_gb_to_bytes() {
local gb="$1"
Expand Down Expand Up @@ -52,6 +54,7 @@ check_image_size() {
if [ -n $image_size ] && [ $image_size -gt $threshold ]; then
echo -e "\nImage size exceeds the threshold of $THRESHOLD_IN_GB gb"
echo -e "\n❌ Image size check failed."
exit 1;
else
echo -e "\n✅ Passed!"
fi
Expand Down

0 comments on commit 79374f3

Please sign in to comment.