Files
probably-rendering-one-more…/.gitea/workflows/creative-browser-diagnostics.yml
T
codex-bot e2c61801dc
runner old dangling image cache recovery / diagnose (push) Successful in 4m32s
Recover only old dangling image cache without tagged releases or volumes
2026-10-31 04:03:07 +08:00

28 lines
1.2 KiB
YAML

name: runner old dangling image cache recovery
on:
push:
branches: [codex/creative-browser-diagnosis]
jobs:
diagnose:
runs-on: ces-control
timeout-minutes: 15
steps:
- name: Reclaim old untagged unused image cache without volumes or tagged releases
run: |
set -euo pipefail
df -h /
echo 'Dangling image cache count (before age filtering)'
docker image ls -q --filter dangling=true | sort -u | wc -l
python3 -u - <<'PY'
import json,subprocess,shutil,time,urllib.request
before=shutil.disk_usage('/').free
# Default dangling-only mode. Do not add --all or use system/volume prune.
subprocess.run(['docker','image','prune','--force','--filter','until=24h'],check=True)
time.sleep(5)
after=shutil.disk_usage('/').free
print('DANGLING RECOVERY '+json.dumps({'beforeFreeBytes':before,'afterFreeBytes':after,'netRecoveredBytes':after-before}),flush=True)
with urllib.request.urlopen('http://8.211.154.134:18131/api/health',timeout=20) as response:
print('PUBLIC HEALTH '+response.read().decode(),flush=True)
PY
df -h /