2 Commits

Author SHA1 Message Date
jiantw83 ed12823df3 feat: update master.yaml job names and add review.yaml for AI code review 2026-05-13 03:26:05 +00:00
jiantw83 6197bbe690 更新 entrypoint.sh 2026-03-31 07:24:41 +00:00
3 changed files with 24 additions and 7 deletions
+3 -2
View File
@@ -1,10 +1,11 @@
name: CD
on:
push:
branches:
- master
jobs:
version:
name: "CD > 計算版本號"
name: 計算版本號
runs-on: ubuntu
outputs:
version: ${{ steps.version.outputs.version }}
@@ -13,7 +14,7 @@ jobs:
id: version
uses: https://gitea.jsc.idv.tw/actions/calculate-version@${{ vars.ACTION_CALCULATE_VERSION }}
release:
name: "CD > 發布專案"
name: 發布專案
runs-on: ubuntu
needs: version
steps:
+19
View File
@@ -0,0 +1,19 @@
name: AI
on:
pull_request:
types: [opened, synchronize]
jobs:
code-review:
name: Code Review
runs-on: ubuntu
steps:
- name: AI Code Review
uses: https://gitea.jsc.idv.tw/actions/code-review@${{ vars.ACTION_CODE_REVIEW_VERSION }}
with:
GEMINI_API_KEY: ${{ secrets.GEMINI_API_KEY }},${{ secrets.GEMINI_API_KEY_1 }},${{ secrets.GEMINI_API_KEY_2 }},${{ secrets.GEMINI_API_KEY_3 }},${{ secrets.GEMINI_API_KEY_4 }},${{ secrets.GEMINI_API_KEY_5 }},${{ secrets.GEMINI_API_KEY_6 }},${{ secrets.GEMINI_API_KEY_7 }},${{ secrets.GEMINI_API_KEY_8 }},${{ secrets.GEMINI_API_KEY_9 }},${{ secrets.GEMINI_API_KEY_10 }},${{ secrets.GEMINI_API_KEY_11 }},${{ secrets.GEMINI_API_KEY_12 }},${{ secrets.GEMINI_API_KEY_13 }},${{ secrets.GEMINI_API_KEY_14 }},${{ secrets.GEMINI_API_KEY_15 }},${{ secrets.GEMINI_API_KEY_16 }},${{ secrets.GEMINI_API_KEY_17 }},${{ secrets.GEMINI_API_KEY_18 }},${{ secrets.GEMINI_API_KEY_19 }}
GEMINI_BASE_URL: https://generativelanguage.googleapis.com/v1beta
GEMINI_MODEL: ${{ vars.GEMINI_MODEL }}
permissions:
contents: write
pull-requests: write
issues: write
+2 -5
View File
@@ -34,7 +34,7 @@ while true; do
# 使用 curl 取得狀態碼,最長等待 60 秒,並將結果輸出到環境變數 STATUS_CODE
STATUS_CODE=$(curl -s --max-time 60 -o /dev/null -w "%{http_code}" "$CHECK_URL")
echo "$STATUS_CODE" && [ "$STATUS_CODE" != "000" ] && break
echo "$STATUS_CODE" && [ "$STATUS_CODE" == "$HEALTH_CODE" ] && break
# 如果狀態碼為 "000",表示連線失敗,等待 60 秒後重試
sleep 60
@@ -43,7 +43,4 @@ done
echo "=================================================="
# 將狀態碼輸出到環境變數
echo "status_code=$STATUS_CODE" >> "$GITHUB_OUTPUT"
# 檢查狀態碼是否正確
[ "$STATUS_CODE" = "$HEALTH_CODE" ] && exit 0 || exit 1
echo "status_code=$STATUS_CODE" >> "$GITHUB_OUTPUT"