chore(ci): 調整 AI 審查工作流程與根目錄測試指令
CI / Release Tag Version (pull_request) Successful in 3s
CI / AI Code Review (pull_request) Failing after 2s

This commit is contained in:
2026-06-27 13:30:50 +00:00
parent 4fcb240208
commit e17c25ce39
2 changed files with 31 additions and 5 deletions
+16 -5
View File
@@ -16,10 +16,22 @@ on:
types: [opened, synchronize] types: [opened, synchronize]
# 定義此 workflow 的 jobs # 定義此 workflow 的 jobs
jobs: jobs:
release-tag-version:
name: Release Tag Version
runs-on: ubuntu
outputs:
version: ${{ steps.release-tag-version.outputs.version }}
steps:
- name: 計算版本號
id: release-tag-version
uses: https://gitea.jsc.idv.tw/composite-actions/release-tag-version@${{ vars.ACTION_RELEASE_TAG_VERSION }}
with:
is_beta: 'true'
# job 識別碼:ai-code-review # job 識別碼:ai-code-review
ai-code-review: ai-code-review:
# job 顯示名稱 # job 顯示名稱
name: AI Code Review name: AI Code Review
needs: release-tag-version
# 指定執行環境的 runner 標籤:ubuntu # 指定執行環境的 runner 標籤:ubuntu
runs-on: ubuntu runs-on: ubuntu
# 此 job 所需的權限設定 # 此 job 所需的權限設定
@@ -34,15 +46,14 @@ jobs:
steps: steps:
- name: 取得程式碼 - name: 取得程式碼
uses: actions/checkout@${{ vars.ACTION_CHECKOUT_VERSION }} uses: actions/checkout@${{ vars.ACTION_CHECKOUT_VERSION }}
# 步驟名稱:呼叫 OpenCode 進行 AI 程式碼審查 - name: 安裝 AI 工具
uses: https://gitea.jsc.idv.tw/docker-actions/antigravity@${{ vars.ACTION_ANTIGRAVITY_VERSION }}
- name: AI 程式碼審查 - name: AI 程式碼審查
# 使用外部 composite action 執行審查邏輯 # 使用外部 composite action 執行審查邏輯
# 版本由 repository variable ACTION_OPENCODE_CODE_REVIEW_VERSION 決定,便於集中管理版本 # 版本由 repository variable ACTION_OPENCODE_CODE_REVIEW_VERSION 決定,便於集中管理版本
uses: ./ uses: https://gitea.jsc.idv.tw/docker-actions/ai-code-review@v${{ needs.release-tag-version.outputs.version }}
# 傳遞給 composite action 的輸入參數 # 傳遞給 composite action 的輸入參數
with: with:
# 留言用 token:取自 secret COMMENT_TOKEN,供 action 在 PR 上發布審查留言 # 留言用 token:取自 secret COMMENT_TOKEN,供 action 在 PR 上發布審查留言
token: ${{ secrets.TOKEN }} token: ${{ secrets.TOKEN }}
opencode_base_url: ${{ vars.OPENCODE_BASE_URL }} model: ${{ vars.AI_CODE_REVIEW_MODEL }}
opencode_provider: ${{ vars.OPENCODE_PROVIDER }}
opencode_model: ${{ vars.OPENCODE_PROVIDER_MODEL }}
+15
View File
@@ -0,0 +1,15 @@
{
"name": "ai-code-review",
"version": "1.0.0",
"description": "AI code review Gitea action",
"private": true,
"scripts": {
"test": "npm --prefix app test"
},
"repository": {
"type": "git",
"url": "https://gitea.jsc.idv.tw/docker-actions/ai-code-review.git"
},
"author": "Jeffery",
"license": "ISC"
}