From df34376d9558941d87ac5a5c17378936d1886c76 Mon Sep 17 00:00:00 2001 From: Jeffery Date: Sat, 27 Jun 2026 13:38:31 +0000 Subject: [PATCH] =?UTF-8?q?chore(ci):=20=E5=A2=9E=E5=8A=A0=20AI=20?= =?UTF-8?q?=E5=8A=A9=E7=90=86=20CLI=20=E5=B7=A5=E5=85=B7=E6=AA=A2=E6=9F=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitea/workflows/ci.yaml | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/.gitea/workflows/ci.yaml b/.gitea/workflows/ci.yaml index fd2171e..8f63b1f 100644 --- a/.gitea/workflows/ci.yaml +++ b/.gitea/workflows/ci.yaml @@ -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: