Update install-gitea-runner.sh
This commit is contained in:
@@ -324,12 +324,20 @@ cat > "$CLEANUP_SCRIPT" <<EOF
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
# Remove stale runner workspace data
|
||||
find "$WORK_DIR" -mindepth 1 -maxdepth 1 -mtime +2 -exec rm -rf {} +
|
||||
|
||||
# Remove stopped containers
|
||||
docker container prune -f || true
|
||||
|
||||
# Remove unused Docker networks
|
||||
docker network prune -f || true
|
||||
|
||||
# Remove dangling images/build cache
|
||||
docker image prune -f || true
|
||||
docker builder prune -af --filter "until=48h" || true
|
||||
|
||||
# Remove Gitea/act task volumes that failed jobs sometimes orphan
|
||||
docker volume ls -q | grep -E '^GITEA-ACTIONS-TASK-' | xargs -r docker volume rm || true
|
||||
EOF
|
||||
|
||||
|
||||
Reference in New Issue
Block a user