feat: simplify dotnet restore conditions and add exclusions.json for AI review
This commit is contained in:
@@ -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": "列入排除問題"
|
||||
}
|
||||
]
|
||||
}
|
||||
+8
-9
@@ -10,18 +10,17 @@ 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
|
||||
shell: bash
|
||||
- name: 測試專案
|
||||
run: dotnet test --no-restore --no-build
|
||||
shell: bash
|
||||
shell: bash
|
||||
|
||||
Reference in New Issue
Block a user