chore(ci): 增加 AI 助理 CLI 工具檢查
CI / Release Tag Version (pull_request) Successful in 3s
CI / AI Code Review (pull_request) Failing after 18s

This commit is contained in:
2026-06-27 13:38:31 +00:00
parent e17c25ce39
commit df34376d95
+18 -2
View File
@@ -48,9 +48,25 @@ jobs:
uses: actions/checkout@${{ vars.ACTION_CHECKOUT_VERSION }}
- name: 安裝 AI 工具
uses: https://gitea.jsc.idv.tw/docker-actions/antigravity@${{ vars.ACTION_ANTIGRAVITY_VERSION }}
- name: 檢查 AI 助理 CLI
shell: bash
run: |
set -e
found=""
for tool in codex claude opencode; do
if command -v "$tool" >/dev/null 2>&1; then
found="${found} ${tool}"
"$tool" --version || true
fi
done
if [ -z "$found" ]; then
echo "找不到可用的 AI 助理 CLI(需要 codex、claude 或 opencode 其中之一)" >&2
exit 1
fi
echo "可用 AI 助理 CLI:${found}"
- name: AI 程式碼審查
# 使用外部 composite action 執行審查邏輯
# 版本由 repository variable ACTION_OPENCODE_CODE_REVIEW_VERSION 決定,便於集中管理版本
# 使用外部 composite action 執行審查邏輯
# 版本由 release-tag-version 計算,便於在 PR 中測試目前 action 版本
uses: https://gitea.jsc.idv.tw/docker-actions/ai-code-review@v${{ needs.release-tag-version.outputs.version }}
# 傳遞給 composite action 的輸入參數
with: