Skip to content

Commit 0b4b6f7

Browse files
committed
ci: fix clean up ressources workflow
1 parent d44e3f1 commit 0b4b6f7

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

.github/actions/workflow-actions/deploy-app/action.yaml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,13 @@ runs:
139139
echo "Application is healthy!"
140140
141141
echo "Cleaning up unused resources..."
142-
docker system prune --all --volumes --force --filter "until=24h"
142+
143+
echo "Remove stopped containers older than 24h"
144+
docker container prune --force --filter "until=24h"
145+
echo "Remove dangling images (those with <none> tags)"
146+
docker image prune --force
147+
echo "Optionally, remove all unused images older than 24h"
148+
docker image prune --all --force --filter "until=24h"
143149
144150
echo "=== Deployment completed successfully at $(date) ==="
145151
} 2>&1 | tee -a ${{ env.DEPLOY_LOG }}

0 commit comments

Comments
 (0)