27 Commits

Author SHA1 Message Date
admin 1df35f111b Merge pull request 'chore: update review workflow settings' (#10) from develop into master
Reviewed-on: #10
Reviewed-by: 系統管理員 <admin@noreply.localhost>
2026-05-16 15:04:50 +00:00
jiantw83 5bdc242e2e Merge pull request 'chore: update review workflow settings' (#9) from feat/ai_code_review into develop
Reviewed-on: #9
2026-05-16 15:03:56 +00:00
jiantw83 c282695699 chore: update review workflow settings 2026-05-16 15:03:26 +00:00
jiantw83 84c62b5f2d Merge pull request '更新 action.yml' (#8) from develop into master
Reviewed-on: #8
2026-05-15 10:33:28 +00:00
jiantw83 57796e9e34 chore: add exclusion for NuGet restore step recommendation
Co-authored-by: Copilot <copilot@github.com>
2026-05-15 10:27:31 +00:00
jiantw83 b6ce49032d 更新 action.yml 2026-05-15 10:23:37 +00:00
jiantw83 7d19bd98ec Merge pull request 'feat: 更新問題排除清單' (#7) from develop into master
Reviewed-on: #7
2026-05-13 06:32:42 +00:00
jiantw83 d05c4e3640 Merge pull request 'fix: rename NuGet step and expand exclusions' (#6) from review-exclusions-nuget into develop
Reviewed-on: #6
2026-05-13 06:28:43 +00:00
AI Review Bot 8f2b784a84 chore: update ai-review findings [skip ci] 2026-05-13 06:25:54 +00:00
jiantw83 5f1bcf79e3 chore: expand ai review exclusions 2026-05-13 06:24:57 +00:00
AI Review Bot 72d16091c0 chore: update ai-review findings [skip ci] 2026-05-13 06:19:26 +00:00
jiantw83 59b00b525d chore: add cache-nuget review exclusions 2026-05-13 06:18:44 +00:00
AI Review Bot 65b26ee9bb chore: update ai-review findings [skip ci] 2026-05-13 06:13:30 +00:00
jiantw83 35112e2132 fix: rename NuGet step and expand exclusions 2026-05-13 06:12:05 +00:00
jiantw83 77e762a1d6 Merge pull request 'feat: update cache-nuget action version and add AI code review workflow' (#5) from develop into master
Reviewed-on: #5
2026-05-13 06:01:04 +00:00
jiantw83 80664d0c60 fix: update exclusions.json entries and refine checkout action version in action.yml 2026-05-13 05:59:51 +00:00
jiantw83 141aace811 feat: simplify dotnet restore conditions and add exclusions.json for AI review 2026-05-13 05:17:11 +00:00
jiantw83 1f2e2d1b80 fix: update checkout action version and refine restore conditions in action.yml 2026-05-13 03:36:30 +00:00
jiantw83 cf0b67291d feat: update cache-nuget action version and add AI code review workflow 2026-05-13 03:03:47 +00:00
jiantw83 85f780f330 Merge pull request 'feat: 為每個步驟加上名稱' (#4) from develop into master
Reviewed-on: #4
2026-05-06 01:34:07 +00:00
Jeffery 0c868593de Merge branch 'develop' of https://gitea.jsc.idv.tw/actions/dotnet-qc into develop 2026-05-06 09:33:36 +08:00
Jeffery e8b08ee12e feat: 為每個步驟加上名稱
Co-authored-by: Copilot <copilot@github.com>
2026-05-06 09:33:33 +08:00
jiantw83 5999f84241 Merge pull request '更新 action.yml' (#3) from develop into master
Reviewed-on: #3
2026-05-06 01:27:31 +00:00
jiantw83 0dad948ccd 更新 action.yml
修改描述
2026-05-06 01:27:05 +00:00
jiantw83 b242dd9c25 Merge pull request 'feat: 透過 nuget.config 檔案判斷要執行的指令' (#2) from develop into master
Reviewed-on: #2
2026-05-06 01:18:59 +00:00
Jeffery c1946c9f2c feat: 透過 nuget.config 檔案判斷要執行的指令
Co-authored-by: Copilot <copilot@github.com>
2026-05-06 09:18:21 +08:00
jiantw83 20213dd29e Merge pull request 'feat: 使用固定版本' (#1) from develop into master
Reviewed-on: #1
2026-05-05 09:25:11 +00:00
5 changed files with 144 additions and 10 deletions
+65
View File
@@ -0,0 +1,65 @@
{
"version": "1.0",
"exclusions": [
{
"id": 1,
"title": "使用來自非官方來源的自訂 Action 的供應鏈風險",
"reason": "列入排除問題"
},
{
"id": 2,
"title": "Composite Action 將 shell 移到 runs 層級",
"reason": "列入排除問題"
},
{
"id": 3,
"title": "cache-nuget@v0.0.3 釘選到修補版本",
"reason": "列入排除問題"
},
{
"id": 4,
"title": "快取 NuGet 套件動作更新至 v0.0.3 後需額外更新紀錄或測試清單",
"reason": "列入排除問題"
},
{
"id": 5,
"title": "復原專案步驟依賴 cache-hit 輸出可能誤跳過 restore",
"reason": "列入排除問題"
},
{
"id": 6,
"title": "cache key 與專案檔變更的關聯應由外部 cache-nuget 動作管理",
"reason": "列入排除問題"
},
{
"id": 7,
"title": "action.yml 的流程需要自動化測試",
"reason": "列入排除問題"
},
{
"id": 8,
"title": "審查 https://gitea.jsc.idv.tw/actions/cache-nuget@v0.0.3 的來源和內容",
"reason": "列入排除問題"
},
{
"id": 9,
"title": "定期審查並更新 https://gitea.jsc.idv.tw/actions/cache-nuget 的版本",
"reason": "列入排除問題"
},
{
"id": 10,
"title": "使用來自非官方或自託管 Gitea 伺服器的外部動作存在供應鏈風險",
"reason": "列入排除問題"
},
{
"id": 11,
"title": "將 NUGET 更正為 NuGet 的命名建議",
"reason": "列入排除問題"
},
{
"id": 12,
"title": "移除 NuGet restore 步驟的建議(action.yml:9",
"reason": "審查意見:建議移除或改為使用快取以避免每次工作流程下載相依套件;此項目列入排除"
}
]
}
+37
View File
@@ -0,0 +1,37 @@
[
{
"level": "warning",
"role": "Aria",
"location": "action.yml:9",
"suggestion": "建議將 'NUGET' 更正為官方名稱的正確大小寫 'NuGet',以保持命名一致性與專業度。",
"is_new": true
},
{
"level": "warning",
"role": "Zara",
"location": "action.yml:10",
"suggestion": "建議評估使用官方或社群廣泛維護的快取動作 (例如 `actions/cache`)。自訂的 Gitea 快取動作可能在可靠性、效能最佳化及維護上不如官方動作,且會引入對特定 Gitea 實例的依賴,若該實例不穩定或效能不佳,將影響 CI/CD 流程的效率。",
"is_new": true
},
{
"level": "warning",
"role": "Rex",
"location": "action.yml:11",
"suggestion": "您正在使用來自外部 Gitea 實例 (`https://gitea.jsc.idv.tw`) 的 GitHub Action。這引入了供應鏈安全風險。如果此外部 Gitea 實例或其上的 Action 遭到入侵,您的工作流程可能會受到惡意程式碼的影響。建議您:\n1. 盡可能使用來自官方或受信任來源(如 GitHub Marketplace 上的驗證發布者)的 Action。\n2. 如果必須使用外部 Action,請徹底審查其原始碼,並考慮將其 Fork 到您的組織或自託管,以確保其內容和安全性。\n3. 確保 `gitea.jsc.idv.tw` 是您完全信任且受控的內部服務,並對其進行適當的安全監控。",
"is_new": true
},
{
"level": "info",
"role": "Zara",
"location": "b/action.yml:10",
"suggestion": "建議定期審查並更新 `https://gitea.jsc.idv.tw/actions/cache-nuget` 的版本(目前為 `v0.0.3`)。新版本可能包含效能優化、錯誤修復或新功能,有助於進一步縮短 CI/CD 流程的執行時間,確保持續採用最新的快取策略與技術。",
"is_new": false
},
{
"level": "info",
"role": "Zara",
"location": "action.yml:7-10",
"suggestion": "雖然已引入 NuGet 快取步驟,但此 Git Diff 未顯示快取動作的具體配置(例如 `key` 和 `path` 參數)。請確保快取鍵設計得當,能有效識別依賴項的變化,以最大化快取命中率並避免不必要的重建,進一步提升效能。不當的快取鍵可能導致快取失效或快取過期,反而降低效率。",
"is_new": true
}
]
+4 -3
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,14 +14,14 @@ 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:
- name: 發布專案
uses: akkuman/gitea-release-action@${{ vars.ACTION_RELEASE_VERSION }}
with:
tag_name: "v${{ needs.version.outputs.version }}"
tag_name: v${{ needs.version.outputs.version }}
- name: 清理成品
uses: https://gitea.jsc.idv.tw/actions/cleanup-release@${{ vars.ACTION_CLEANUP_RELEASE_VERSION }}
with:
+23
View File
@@ -0,0 +1,23 @@
name: AI
on:
pull_request:
branches-ignore:
- master
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:
GITEA_TOKEN: ${{ secrets.RUNNER_TOKEN }}
GITEA_COMMENT_TOKEN: ${{ secrets.GITEA_TOKEN }}
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
+15 -7
View File
@@ -1,14 +1,22 @@
name: 'DOTNET QC'
description: '品質檢查 NUGET 套件'
description: '品質檢查 .NET 套件'
author: 'Jeffery'
runs:
using: 'composite'
steps:
- uses: actions/checkout@v6
- uses: https://gitea.jsc.idv.tw/actions/cache-nuget@v0.0.2
- run: dotnet restore
- name: 取得專案
uses: actions/checkout@v6
- name: 復原專案
run: |
if [[ -f "nuget.config" ]]; then
dotnet restore --configfile nuget.config
else
dotnet restore
fi
shell: bash
- run: dotnet build --no-restore
- name: 建置專案
run: dotnet build --no-restore
shell: bash
- name: 測試專案
run: dotnet test --no-restore --no-build
shell: bash
- run: dotnet test --no-restore --no-build
shell: bash