Files
ai-code-review/.gitea/workflows/ci.yaml
T
Jeffery e37a96433d
CI / TEST (Claude) (pull_request) Successful in 23s
CI / TEST (Codex) (pull_request) Failing after 3m4s
node-actions/template: CI / BUILD (pull_request) Successful in 4s
CI / TEST (Antigravity) (pull_request) Failing after 37s
fix(ci): 傳入各 AI 工具的 OAuth 憑證修正未登入問題
2026-07-20 13:50:07 +08:00

105 lines
4.4 KiB
YAML

# ============================================================================
# 用途:在 pull request 針對 develop 分支開啟或同步時,分別以 Antigravity、Codex、Claude 環境執行本機 AI Code Review action。
# 更新時間:2026/07/17 18:49:58
# ============================================================================
# Workflow 顯示名稱。
name: CI
# Workflow 觸發條件區塊。
on:
# 以 pull request 事件觸發。
pull_request:
# 限定 pull request 目標分支。
branches:
# 僅在目標分支為 develop 時執行。
- develop
# 限定 pull request 開啟與同步更新時執行。
types: [opened, synchronize]
# Job 定義區塊。
jobs:
# Antigravity 工具環境測試 job。
test-antigravity:
# Job 在 workflow UI 顯示的名稱。
name: TEST (Antigravity)
# 指定執行 runner 標籤;需人工確認本 Gitea runner 是否使用 ubuntu 標籤。
runs-on: ubuntu
# Job 執行步驟。
steps:
# 取得存取庫內容供後續 action 使用。
- name: 取得存取庫資訊
# 使用呼叫端 vars 指定的 checkout action 版本。
uses: actions/checkout@${{ vars.ACTION_CHECKOUT_VERSION }}
# 安裝 Antigravity 工具環境。
- name: 安裝工具
# 使用 Gitea composite action 安裝 Antigravity,版本由 vars 指定。
uses: https://gitea.jsc.idv.tw/composite-actions/setup-antigravity@${{ vars.ACTION_SETUP_ANTIGRAVITY_VERSION }}
with:
oauth: ${{ secrets.ANTIGRAVITY_OAUTH }}
# 執行目前存取庫的 AI Code Review action。
- name: 程式碼審查
# 以目前存取庫根目錄的 action.yml 作為 action 來源。
uses: ./
# 傳入 action inputs。
with:
# Gitea / GitHub token,用於 PR 留言與 findings 寫回。
token: ${{ secrets.GITHUB_TOKEN }}
# 啟用建問題模式:審查內容改發到追蹤 issue,並在 PR 回貼 issue 連結。
create-issue: 'true'
# Codex 工具環境測試 job。
test-codex:
# Job 在 workflow UI 顯示的名稱。
name: TEST (Codex)
# 指定執行 runner 標籤;需人工確認本 Gitea runner 是否使用 ubuntu 標籤。
runs-on: ubuntu
# Job 執行步驟。
steps:
# 取得存取庫內容供後續 action 使用。
- name: 取得存取庫資訊
# 使用呼叫端 vars 指定的 checkout action 版本。
uses: actions/checkout@${{ vars.ACTION_CHECKOUT_VERSION }}
# 安裝 Codex 工具環境。
- name: 安裝工具
# 使用 Gitea composite action 安裝 Codex,版本由 vars 指定。
uses: https://gitea.jsc.idv.tw/composite-actions/setup-codex@${{ vars.ACTION_SETUP_CODEX_VERSION }}
with:
oauth: ${{ secrets.CODEX_OAUTH }}
# 執行目前存取庫的 AI Code Review action。
- name: 程式碼審查
# 以目前存取庫根目錄的 action.yml 作為 action 來源。
uses: ./
# 傳入 action inputs。
with:
# Gitea / GitHub token,用於 PR 留言與 findings 寫回。
token: ${{ secrets.GITHUB_TOKEN }}
# 啟用建問題模式:審查內容改發到追蹤 issue,並在 PR 回貼 issue 連結。
create-issue: 'true'
# Claude 工具環境測試 job。
test-claude:
# Job 在 workflow UI 顯示的名稱。
name: TEST (Claude)
# 指定執行 runner 標籤;需人工確認本 Gitea runner 是否使用 ubuntu 標籤。
runs-on: ubuntu
# Job 執行步驟。
steps:
# 取得存取庫內容供後續 action 使用。
- name: 取得存取庫資訊
# 使用呼叫端 vars 指定的 checkout action 版本。
uses: actions/checkout@${{ vars.ACTION_CHECKOUT_VERSION }}
# 安裝 Claude 工具環境。
- name: 安裝工具
# 使用 Gitea composite action 安裝 Claude,版本由 vars 指定。
uses: https://gitea.jsc.idv.tw/composite-actions/setup-claude@${{ vars.ACTION_SETUP_CLAUDE_VERSION }}
with:
oauth: ${{ secrets.CLAUDE_OAUTH }}
# 執行目前存取庫的 AI Code Review action。
- name: 程式碼審查
# 以目前存取庫根目錄的 action.yml 作為 action 來源。
uses: ./
# 傳入 action inputs。
with:
# Gitea / GitHub token,用於 PR 留言與 findings 寫回。
token: ${{ secrets.GITHUB_TOKEN }}
# 啟用建問題模式:審查內容改發到追蹤 issue,並在 PR 回貼 issue 連結。
create-issue: 'true'