fix: bypass broken Nexus, use nuget.org + local proto build

- NuGet.config: nuget.org for standard packages, local nupkg for proto
- Dockerfile: COPY nupkg/ before restore
- CI: build proto from CMS source before Docker build
This commit is contained in:
masoodafar-web
2026-03-12 00:03:49 +03:30
parent 85208da1b5
commit 7147e9930f
3 changed files with 20 additions and 9 deletions
+15
View File
@@ -55,6 +55,21 @@ jobs:
echo "${{ secrets.REGISTRY_PASSWORD }}" | docker login 194.5.195.53:32082 -u admin --password-stdin
echo "${{ secrets.REGISTRY_PASSWORD }}" | docker login ${{ env.REGISTRY }} -u admin --password-stdin
- name: Build Proto Package
run: |
echo "📦 Building Proto package from CMS..."
git clone --depth 1 --branch kub-stage http://gitea-svc:3000/admin/CMS.git /tmp/cms
docker run --rm --network host \
-v /tmp/cms:/cms \
-v $(pwd)/src/nupkg:/out \
194.5.195.53:32082/dotnet/sdk:9.0 sh -c '
cd /cms/src/CMSMicroservice.Protobuf
dotnet restore --source https://api.nuget.org/v3/index.json
dotnet build -c Release --no-restore
dotnet pack -c Release --no-build -o /out
'
echo "✅ Proto package: $(ls src/nupkg/)"
- name: Build Docker Image
run: |
cd src