改用 AI 助理 CLI 並強化 AI Code Review 執行流程 #13
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user