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 227f3f0 commit 225dcb1
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions .github/workflows/staging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,12 @@ 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 2GB to bytes (2 * 1024 * 1024 * 1024)
# LIMIT=2147483648
# Convert 40MB to bytes (40 * 1024 * 1024)
LIMIT= 41943040
LIMIT=41943040
# Check if cache size exceeds the limit and prune if necessary
if [ "$CACHE_SIZE" -gt "$LIMIT" ]; then
echo "Cache size exceeded 2GB. Cleaning..."
echo "Cache size exceeded 40MB. Cleaning..."
docker system prune -af
else
echo "Cache size is within limit."
Expand Down

0 comments on commit 225dcb1

Please sign in to comment.