Compare commits

...

6 Commits

Author SHA1 Message Date
jiantw83 43cddbd2c4 feat: update workflow names for clarity and add AI code review workflow 2026-05-13 03:28:58 +00:00
Jeffery d407899afb feat: 將參數輸出移到最後一個步驟 2026-03-26 14:51:28 +08:00
jiantw83 54cba9b783 更新 action.yaml 2026-03-25 06:40:59 +00:00
jiantw83 e6708957b0 更新 Dockerfile 2026-03-25 05:42:30 +00:00
jiantw83 4e2af3ffe5 更新 action.yaml 2026-03-25 02:46:44 +00:00
Jeffery 11c39bc75a test: 修正基本版本號的過濾方法 2026-03-24 18:34:55 +08:00
5 changed files with 30 additions and 11 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 -3
View File
@@ -1,8 +1,7 @@
FROM alpine:latest
# 更新並安裝必要的工具
RUN apk update \
&& apk add --no-cache bash curl jq
# 安裝必要的工具
RUN apk add --no-cache --no-check-certificate bash curl jq
COPY entrypoint.sh /entrypoint.sh
+1 -1
View File
@@ -14,5 +14,5 @@ runs:
env:
GITEA_SERVER_URL: ${{ gitea.server_url }}
GITEA_REPOSITORY: ${{ gitea.repository }}
RUNNER_TOKEN: ${{ secrets.RUNNER_TOKEN }}
RUNNER_TOKEN: ${{ inputs.RUNNER_TOKEN || secrets.GITEA_TOKEN || secrets.RUNNER_TOKEN }}
IS_BETA: ${{ inputs.IS_BETA }}
+5 -5
View File
@@ -39,8 +39,8 @@ else
RELEASE_JSON="$(curl -s "$RELEASE_URL")"
fi
# 從成品資訊取得最新的版本號
LATEST_VERSION=$(echo "$RELEASE_JSON" | jq -r 'if length > 0 then .[0].tag_name else "v0.0.0" end' | sed 's/^v//')
# 從成品資訊取得最新的正式版版本號(排除 beta,去除 v 前綴)
LATEST_VERSION=$(echo "$RELEASE_JSON" | jq -r '[.[] | select(.tag_name | test("-beta\\.") | not)] | if length > 0 then .[0].tag_name else "v0.0.0" end' | sed 's/^v//')
# 並檢查是否為空或 "null" 後
([ -z "$LATEST_VERSION" ] || [ "$LATEST_VERSION" = "null" ]) && LATEST_VERSION="0.0.0"
@@ -90,7 +90,7 @@ fi
echo "NEW_VERSION=$NEW_VERSION"
# 將版本輸出到環境變數
echo "version=$NEW_VERSION" >> $GITHUB_OUTPUT
echo "=================================================="
echo "=================================================="
# 將版本輸出到環境變數
echo "version=$NEW_VERSION" >> $GITHUB_OUTPUT