terry-wallet-login #15
@@ -17,20 +17,12 @@ jobs:
|
||||
df -h
|
||||
du -sh "$HOME/.cache/act" "$HOME/.npm" "$HOME/actions-runner/_work" 2>/dev/null
|
||||
|
||||
# Identify current act workspace (most recently modified dir) and keep it; wipe the rest.
|
||||
# DO NOT touch ~/.cache/act for the current job — only sweep dirs older than 60 min.
|
||||
if [ -d "$HOME/.cache/act" ]; then
|
||||
CURRENT_ACT=$(ls -1dt "$HOME/.cache/act"/*/ 2>/dev/null | head -1 || true)
|
||||
echo "Preserving current act dir: ${CURRENT_ACT:-<none>}"
|
||||
for d in "$HOME/.cache/act"/*/; do
|
||||
[ -d "$d" ] || continue
|
||||
if [ "$d" != "$CURRENT_ACT" ]; then
|
||||
echo "Removing stale act workspace: $d"
|
||||
rm -rf "$d"
|
||||
fi
|
||||
done
|
||||
find "$HOME/.cache/act" -mindepth 1 -maxdepth 1 -type d -mmin +60 -exec rm -rf {} + 2>/dev/null
|
||||
fi
|
||||
|
||||
# Wipe npm and setup-node caches (will repopulate from registry via cache: npm)
|
||||
# Wipe npm and setup-node caches (cache: npm will repopulate from registry).
|
||||
rm -rf "$HOME/.npm/_cacache" "$HOME/.npm/_logs" 2>/dev/null
|
||||
rm -rf "$HOME/.cache/setup-node" 2>/dev/null
|
||||
|
||||
@@ -44,7 +36,7 @@ jobs:
|
||||
docker system prune -af --volumes 2>/dev/null
|
||||
fi
|
||||
|
||||
# apt cache (if runner uses apt)
|
||||
# apt/yum cache
|
||||
if command -v apt-get >/dev/null 2>&1; then
|
||||
sudo apt-get clean 2>/dev/null
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user