chore(ci): 改回自動偵測已安裝 AI 助理工具
CI / Release Tag Version (pull_request) Successful in 3s
CI / AI Code Review (pull_request) Failing after 17s

This commit is contained in:
2026-06-27 13:41:15 +00:00
parent 4818e82d76
commit 5457e68065
+2 -5
View File
@@ -50,20 +50,17 @@ jobs:
uses: https://gitea.jsc.idv.tw/docker-actions/antigravity@${{ vars.ACTION_ANTIGRAVITY_VERSION }} uses: https://gitea.jsc.idv.tw/docker-actions/antigravity@${{ vars.ACTION_ANTIGRAVITY_VERSION }}
- name: 檢查 AI 助理 CLI - name: 檢查 AI 助理 CLI
shell: bash shell: bash
env:
AI_ASSISTANT_CLI_TOOLS: ${{ vars.AI_ASSISTANT_CLI_TOOLS }}
run: | run: |
set -e set -e
tools="${AI_ASSISTANT_CLI_TOOLS:-codex claude opencode}"
found="" found=""
for tool in $tools; do for tool in codex claude opencode; do
if command -v "$tool" >/dev/null 2>&1; then if command -v "$tool" >/dev/null 2>&1; then
found="${found} ${tool}" found="${found} ${tool}"
"$tool" --version || true "$tool" --version || true
fi fi
done done
if [ -z "$found" ]; then if [ -z "$found" ]; then
echo "找不到可用的 AI 助理 CLI(候選工具:${tools}" >&2 echo "找不到可用的 AI 助理 CLI(需要 codex、claude 或 opencode 其中之一" >&2
exit 1 exit 1
fi fi
echo "可用 AI 助理 CLI:${found}" echo "可用 AI 助理 CLI:${found}"