# Gitea Runner使用指南(快速版) ## Runner已配置完成! **Runner資訊:** -版本:v1.0.3 - 名稱:accusys-Mac-mini-M4-2.local - ID:1 -地址:https://gitea.momentry.ddns.net --- ## 啟動 Runner ### 方式A:前景執行(測試用) ```bash cd /Users/accusys/markbase ./scripts/start_runner.sh ``` 或直接執行: ```bash cd /Users/accusys/markbase ~/.local/bin/gitea-runner daemon ``` ### 方式B:背景服務(macOS launchd) ```bash #配置為系統服務 ./scripts/setup_launchd.sh #管理命令 launchctl load ~/Library/LaunchAgents/com.gitea.runner.plist #啟動 launchctl unload ~/Library/LaunchAgents/com.gitea.runner.plist #停止 launchctl list | grep gitea #狀態 tail -f /tmp/gitea-runner.log #日誌 ``` --- ##驗證 Runner狀態 ```bash ./scripts/verify_runner.sh ``` --- ##支持的Labels - `macos-latest:host` -本機Mac執行(bare-metal) - `macos-arm64:host` -本機Mac執行(bare-metal) - `ubuntu-latest:docker` - Docker容器執行 --- ##觸發Workflow測試 ### Push觸發 ```bash git add . git commit -m "test workflow" git push origin main ``` ### 在Gitea查看結果 1.登入:https://gitea.momentry.ddns.net 2.進入專案 → Actions →查看workflow執行狀態 --- ##常見問題 **Q: Runner無法連接Gitea?** ```bash curl -I https://gitea.momentry.ddns.net ``` **Q: Workflow執行失敗?** ```bash tail -f /tmp/gitea-runner.log tail -f /tmp/gitea-runner.err ``` **Q: macOS功能測試失敗?** -確認SwitchAudioSource已安裝:`brew install switchaudio-source` -確認使用`runs-on: macos-latest`(bare-metal執行) --- ##Runner配置檔案 **位置:** `/Users/accusys/markbase/.runner` **重要:** -不要手動刪除.runner檔案(會導致Runner重新註冊) - Runner token與註冊token不同(已自動生成) --- **最後更新:2026-05-16**