Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
sanchayan721 committed Aug 29, 2023
1 parent e77af8e commit 50b2140
Showing 1 changed file with 12 additions and 11 deletions.
23 changes: 12 additions & 11 deletions .github/workflows/staging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,17 +30,18 @@ jobs:
# Calculate Docker cache size in bytes
CACHE_SIZE=$(docker images --filter "dangling=true" -q --no-trunc | xargs -r docker inspect --format='{{.Size}}' | awk '{s+=$1} END {print s}')
# Convert 40MB to bytes (40 * 1024 * 1024)
CACHE_LIMIT=41943040
# Check if cache size exceeds the limit and prune if necessary
if [ "$CACHE_SIZE" -gt "$CACHE_LIMIT" ]; then
echo "Cache size exceeded 40MB. Cleaning..."
docker system prune -af
else
echo "Cache size is within limit."
fi
echo "Cache size is $CACHE_SIZE"
# # Convert 40MB to bytes (40 * 1024 * 1024)
# CACHE_LIMIT=41943040
# # Check if cache size exceeds the limit and prune if necessary
# if [ "$CACHE_SIZE" -gt "$CACHE_LIMIT" ]; then
# echo "Cache size exceeded 40MB. Cleaning..."
# docker system prune -af
# else
# echo "Cache size is within limit."
# fi
# Calculate Docker images size in bytes
IMAGES_SIZE=$(docker images -q --no-trunc | xargs -r docker inspect --format='{{.Size}}' | awk '{s+=$1} END {print s}')
Expand Down

0 comments on commit 50b2140

Please sign in to comment.