chore: sync workflows from base-template

This commit is contained in:
github-actions[bot]
2026-03-12 06:48:18 +00:00
parent 6d26ace8ab
commit 6064ef0759

View File

@@ -98,10 +98,20 @@ while [ $COUNT -lt $MAX_RETRY ]; do
fi fi
if [ "$NEW_RUNNING" -gt "0" ]; then if [ "$NEW_RUNNING" -gt "0" ]; then
# Cleanup dangling images setelah redeploy sukses
echo "🧹 Membersihkan dangling images..."
curl -s -X POST "https://${PORTAINER_URL}/api/endpoints/${ENDPOINT_ID}/docker/images/prune" \
-H "Authorization: Bearer ${TOKEN}" \
-H "Content-Type: application/json" \
-d '{"filters":{"dangling":["true"]}}' | jq -r '" Reclaimed: \(.SpaceReclaimed // 0 | . / 1073741824 | tostring | .[0:5]) GB"'
echo "✅ Cleanup selesai!"
echo "" echo ""
echo "✅ Stack $STACK_NAME berhasil di-redeploy dengan image baru dan running!" echo "✅ Stack $STACK_NAME berhasil di-redeploy dengan image baru dan running!"
exit 0 exit 0
fi fi
done done
echo "" echo ""