ci(runner): auto-cleanup local Docker image and build cache after push
This commit is contained in:
@@ -56,3 +56,13 @@ jobs:
|
||||
curl -s -X POST \
|
||||
"https://portainer.eibl.tech/api/stacks/webhooks/6e67c0b7-1c5d-4bb2-b8b8-4a6ec66d3b87"
|
||||
echo "✓ Portainer webhook triggered"
|
||||
|
||||
- name: Clean up local Docker image and build cache
|
||||
if: always()
|
||||
run: |
|
||||
IMAGE_TAG="gitea.eibl.tech/me0nline/logar-runner:latest"
|
||||
echo "Removing local Docker image ${IMAGE_TAG} and dangling layers..."
|
||||
docker rmi -f "${IMAGE_TAG}" || true
|
||||
docker image prune -f || true
|
||||
docker builder prune -f || true
|
||||
echo "✓ Local Docker host cleaned successfully."
|
||||
|
||||
Reference in New Issue
Block a user