feat: move image cleanup function inside gitops router

This commit is contained in:
Pallav Vasa
2025-05-17 08:08:15 +00:00
parent f422da8d9e
commit a9adb834e5
2 changed files with 14 additions and 16 deletions

View File

@ -1,12 +0,0 @@
#!/bin/bash
# Get list of image IDs with <none> tag (dangling images)
dangling_images=$(podman images -f "dangling=true" -q)
if [ -z "$dangling_images" ]; then
echo "✅ No dangling images to remove."
else
echo "⚠️ Removing dangling images..."
echo "$dangling_images" | xargs podman rmi -f
echo "🧹 Done!"
fi