fix(ci): use --source flag instead of --configfile for NuGet restore

--configfile nuget.mirror.config fails when the file isn't present in
the workspace (e.g. when Gitea is behind GitHub on commits).

--source inline URL is simpler, self-contained, and replaces all
configured sources — no extra file dependency in CI.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
soroush.asadi
2026-05-28 16:39:36 +03:30
parent 3cb39c9b81
commit 32d9900e07
+2 -2
View File
@@ -74,7 +74,7 @@ jobs:
git checkout FETCH_HEAD
- name: Restore
run: dotnet restore src/Meezi.API/Meezi.API.csproj --configfile nuget.mirror.config
run: dotnet restore src/Meezi.API/Meezi.API.csproj --source http://mirror:8081/repository/nuget-group/index.json
- name: Build
run: dotnet build src/Meezi.API/Meezi.API.csproj --no-restore -c Release
@@ -107,7 +107,7 @@ jobs:
git checkout FETCH_HEAD
- name: Restore
run: dotnet restore src/Meezi.Admin.API/Meezi.Admin.API.csproj --configfile nuget.mirror.config
run: dotnet restore src/Meezi.Admin.API/Meezi.Admin.API.csproj --source http://mirror:8081/repository/nuget-group/index.json
- name: Build
run: dotnet build src/Meezi.Admin.API/Meezi.Admin.API.csproj --no-restore -c Release