From 1fd22993ab33ea978a4bdcb0bbde4322e72ab92d Mon Sep 17 00:00:00 2001 From: Jeffery Date: Sat, 11 Jul 2026 12:58:07 +0000 Subject: [PATCH 1/3] =?UTF-8?q?style(.gitea/workflows/ci):=20=E5=B0=8D?= =?UTF-8?q?=E9=BD=8A=E5=B7=A5=E4=BD=9C=E6=B5=81=E7=A8=8B=E8=A8=BB=E8=A7=A3?= =?UTF-8?q?=E8=88=87=E7=B8=AE=E6=8E=92?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitea/workflows/ci.yaml | 104 +++++++++++++++++++-------------------- 1 file changed, 52 insertions(+), 52 deletions(-) diff --git a/.gitea/workflows/ci.yaml b/.gitea/workflows/ci.yaml index eeca1a3..0eb0c10 100644 --- a/.gitea/workflows/ci.yaml +++ b/.gitea/workflows/ci.yaml @@ -28,34 +28,34 @@ jobs: is_beta: ${{ env.IS_BETA }} # build job 的執行步驟。 steps: - # 先依 repo 狀態計算版本號。 - - name: Calculate Version - # 供後續步驟讀取輸出用的 step id。 - id: calculate-version - # 使用版本計算 action。 - uses: https://gitea.jsc.idv.tw/actions/calculate-version@${{ vars.ACTION_CALCULATE_VERSION }} - # 傳入 action 參數。 - with: - # 告知 action 是否為 beta 分支情境。 - is_beta: ${{ env.IS_BETA }} - # 依計算出的版本建立 release。 - - name: Publishing Release - # 使用 release action。 - uses: akkuman/gitea-release-action@${{ vars.ACTION_GITEA_RELEASE_VERSION }} - # 這個 step 的環境變數。 - env: - # 取前一步算出的版本號。 - VERSION: ${{ steps.calculate-version.outputs.version }} - # release action 的參數。 - with: - # release 名稱。 - name: "${{ gitea.event.repository.name }} v${{ env.VERSION }}" - # release tag 名稱。 - tag_name: "v${{ env.VERSION }}" - # 指向目前提交。 - target_commitish: ${{ gitea.sha }} - # beta 情境時標記為 prerelease。 - prerelease: ${{ env.IS_BETA }} + # 先依 repo 狀態計算版本號。 + - name: Calculate Version + # 供後續步驟讀取輸出用的 step id。 + id: calculate-version + # 使用版本計算 action。 + uses: https://gitea.jsc.idv.tw/actions/calculate-version@${{ vars.ACTION_CALCULATE_VERSION }} + # 傳入 action 參數。 + with: + # 告知 action 是否為 beta 分支情境。 + is_beta: ${{ env.IS_BETA }} + # 依計算出的版本建立 release。 + - name: Publishing Release + # 使用 release action。 + uses: akkuman/gitea-release-action@${{ vars.ACTION_GITEA_RELEASE_VERSION }} + # 這個 step 的環境變數。 + env: + # 取前一步算出的版本號。 + VERSION: ${{ steps.calculate-version.outputs.version }} + # release action 的參數。 + with: + # release 名稱。 + name: "${{ gitea.event.repository.name }} v${{ env.VERSION }}" + # release tag 名稱。 + tag_name: "v${{ env.VERSION }}" + # 指向目前提交。 + target_commitish: ${{ gitea.sha }} + # beta 情境時標記為 prerelease。 + prerelease: ${{ env.IS_BETA }} # 第二個 job:在 beta 情境執行 AI Code Review。 test: # job 顯示名稱。 @@ -72,26 +72,26 @@ jobs: VERSION: ${{ needs.build.outputs.version }} # test job 的步驟。 steps: - # 安裝或設定 LLM CLI。 - - name: Setup LLM CLI - # 使用對應的 setup action。 - uses: https://gitea.jsc.idv.tw/actions/setup-${{ vars.ACTION_SETUP_LLM_CLI }} - # 傳入設定。 - with: - # LLM CLI 的 OAuth 憑證。 - oauth: ${{ secrets.LLM_OAUTH }} - # 執行 AI Code Review action。 - - name: Run AI Code Review - # step id,方便追蹤。 - id: ai-code-review - # 使用本 repo 發佈的 action。 - uses: https://gitea.jsc.idv.tw/actions/ai-code-review@v${{ env.VERSION }} - # action 參數。 - with: - # 存取 Gitea API 的 token。 - token: ${{ secrets.TOKEN }} - # 指定 LLM 模型名稱。 - model: ${{ vars.LLM_NAME }} + # 安裝或設定 LLM CLI。 + - name: Setup LLM CLI + # 使用對應的 setup action。 + uses: https://gitea.jsc.idv.tw/actions/setup-${{ vars.ACTION_SETUP_LLM_CLI }} + # 傳入設定。 + with: + # LLM CLI 的 OAuth 憑證。 + oauth: ${{ secrets.LLM_OAUTH }} + # 執行 AI Code Review action。 + - name: Run AI Code Review + # step id,方便追蹤。 + id: ai-code-review + # 使用本 repo 發佈的 action。 + uses: https://gitea.jsc.idv.tw/actions/ai-code-review@v${{ env.VERSION }} + # action 參數。 + with: + # 存取 Gitea API 的 token。 + token: ${{ secrets.TOKEN }} + # 指定 LLM 模型名稱。 + model: ${{ vars.LLM_NAME }} # 第三個 job:輸出最終版本資訊。 result: # job 顯示名稱。 @@ -106,7 +106,7 @@ jobs: VERSION: ${{ needs.build.outputs.version }} # result job 的步驟。 steps: - # 顯示版本號。 - - name: Show Version - # 將版本輸出到 log。 - run: echo "$VERSION" + # 顯示版本號。 + - name: Show Version + # 將版本輸出到 log。 + run: echo "$VERSION" From 15c1228316c826c6517998b84e2864505a2bcb14 Mon Sep 17 00:00:00 2001 From: Jeffery Date: Sat, 11 Jul 2026 12:58:45 +0000 Subject: [PATCH 2/3] =?UTF-8?q?style(.gitea/workflows/master):=20=E5=B0=8D?= =?UTF-8?q?=E9=BD=8A=E5=B7=A5=E4=BD=9C=E6=B5=81=E7=A8=8B=E8=A8=BB=E8=A7=A3?= =?UTF-8?q?=E8=88=87=E7=B8=AE=E6=8E=92?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitea/workflows/master.yaml | 48 ++++++++++++++++++------------------ 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/.gitea/workflows/master.yaml b/.gitea/workflows/master.yaml index d4e4d89..95fa62c 100644 --- a/.gitea/workflows/master.yaml +++ b/.gitea/workflows/master.yaml @@ -26,27 +26,27 @@ jobs: COMMIT_SHA: ${{ gitea.event.commits[1].id }} # deploy job 的步驟。 steps: - # 顯示 Gitea context。 - - name: Show Gitea Context - # 將 context 格式化輸出。 - run: echo "$GITEA_CONTEXT" | jq . - # 取回完整原始碼與 tags。 - - name: Source Code Checkout - # 使用 checkout action。 - uses: actions/checkout@${{ vars.ACTION_CHECKOUT_VERSION }} - # checkout 參數。 - with: - # 取得完整歷史。 - fetch-depth: 0 - # 一併抓取 tags。 - fetch-tags: true - # 查詢指定 commit 對應的 tag。 - - name: Get Commit Tag - # 供後續步驟讀取輸出。 - id: commit - # 把查到的 tag 寫入 action 輸出。 - run: echo "tag=$(git describe --contains ${{ env.COMMIT_SHA }})" >> $GITEA_OUTPUT - # 顯示剛查到的 tag。 - - name: Show Tag - # 將 tag 印到 log。 - run: echo "${{ steps.commit.outputs.tag }}" + # 顯示 Gitea context。 + - name: Show Gitea Context + # 將 context 格式化輸出。 + run: echo "$GITEA_CONTEXT" | jq . + # 取回完整原始碼與 tags。 + - name: Source Code Checkout + # 使用 checkout action。 + uses: actions/checkout@${{ vars.ACTION_CHECKOUT_VERSION }} + # checkout 參數。 + with: + # 取得完整歷史。 + fetch-depth: 0 + # 一併抓取 tags。 + fetch-tags: true + # 查詢指定 commit 對應的 tag。 + - name: Get Commit Tag + # 供後續步驟讀取輸出。 + id: commit + # 把查到的 tag 寫入 action 輸出。 + run: echo "tag=$(git describe --contains ${{ env.COMMIT_SHA }})" >> $GITEA_OUTPUT + # 顯示剛查到的 tag。 + - name: Show Tag + # 將 tag 印到 log。 + run: echo "${{ steps.commit.outputs.tag }}" From 27ddf04ec24192eefae636faa00d6eba89b3e109 Mon Sep 17 00:00:00 2001 From: Jeffery Date: Sat, 11 Jul 2026 13:25:21 +0000 Subject: [PATCH 3/3] =?UTF-8?q?fix(.gitea/workflows/ci):=20=E4=BF=AE?= =?UTF-8?q?=E6=AD=A3=E7=89=88=E6=9C=AC=E8=BC=B8=E5=87=BA=E4=BE=86=E6=BA=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitea/workflows/ci.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitea/workflows/ci.yaml b/.gitea/workflows/ci.yaml index 0eb0c10..454ca0b 100644 --- a/.gitea/workflows/ci.yaml +++ b/.gitea/workflows/ci.yaml @@ -23,7 +23,7 @@ jobs: # 對外輸出供後續 job 使用。 outputs: # 輸出版本字串。 - version: ${{ env.VERSION }} + version: ${{ steps.calculate-version.outputs.version }} # 輸出是否為 beta。 is_beta: ${{ env.IS_BETA }} # build job 的執行步驟。