feat: simplify dotnet restore conditions and add exclusions.json for AI review

This commit is contained in:
2026-05-13 05:17:11 +00:00
parent 1f2e2d1b80
commit 141aace811
2 changed files with 28 additions and 9 deletions
+20
View File
@@ -0,0 +1,20 @@
{
"version": "1.0",
"exclusions": [
{
"id": 2,
"title": "使用來自內部 Gitea 伺服器的自訂 Action 的供應鏈風險",
"reason": "列入排除問題"
},
{
"id": 3,
"title": "composite action 缺乏自動化整合測試",
"reason": "列入排除問題"
},
{
"id": 4,
"title": "新的 dotnet restore 條件判斷需要整合測試覆蓋邊界條件",
"reason": "列入排除問題"
}
]
}
+7 -8
View File
@@ -10,14 +10,13 @@ runs:
id: cache-nuget
uses: https://gitea.jsc.idv.tw/actions/cache-nuget@v0.0.3
- name: 復原專案
run: dotnet restore
# 只有在快取未命中且無特定 nuget.config 時才執行 restore,避免重複操作 (Zara)
if: steps.cache-nuget.outputs.cache-hit != 'true' && hashFiles('nuget.config') == ''
shell: bash
- name: 復原專案
run: dotnet restore --configfile nuget.config
# 只有在快取未命中且存在 nuget.config 時才執行 restore,加強條件判斷 (Zara)
if: steps.cache-nuget.outputs.cache-hit != 'true' && hashFiles('nuget.config') != ''
if: steps.cache-nuget.outputs.cache-hit != 'true'
run: |
if [[ -f "nuget.config" ]]; then
dotnet restore --configfile nuget.config
else
dotnet restore
fi
shell: bash
- name: 建置專案
run: dotnet build --no-restore