問題: Runner 並行執行時 "file already exists" 導致 CD 失敗 解決方案: 1. CD Workflow: 刪除整個 _diag/pages 目錄再重建 (非 rm -rf /*) 2. Systemd Timer: 每 5 分鐘自動清理過期檔案 3. flock 鎖定: 防止清理程序競爭 新增檔案: - ops/runner/cleanup-runner-diag.sh - 清理腳本 - ops/runner/runner-diag-cleanup.service - Systemd service - ops/runner/runner-diag-cleanup.timer - 定時器 - ops/runner/deploy-runner-cleanup.sh - 部署腳本 - ops/runner/README.md - 文檔 部署指令: ssh wooo@192.168.0.110 bash awoooi/ops/runner/deploy-runner-cleanup.sh Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
22 lines
683 B
Desktop File
22 lines
683 B
Desktop File
# =============================================================================
|
|
# Runner Diagnostic Cleanup Service
|
|
# =============================================================================
|
|
# 部署: sudo cp runner-diag-cleanup.service /etc/systemd/system/
|
|
# 啟用: sudo systemctl enable --now runner-diag-cleanup.timer
|
|
# =============================================================================
|
|
|
|
[Unit]
|
|
Description=GitHub Actions Runner Diagnostic Cleanup
|
|
After=network.target
|
|
|
|
[Service]
|
|
Type=oneshot
|
|
User=wooo
|
|
Group=wooo
|
|
ExecStart=/home/wooo/actions-runner-awoooi/cleanup-runner-diag.sh
|
|
StandardOutput=journal
|
|
StandardError=journal
|
|
|
|
[Install]
|
|
WantedBy=multi-user.target
|