ci7
Release Docker Image / build-and-push (release) Failing after 9s
Release NuGet Packages / pack-and-push (release) Failing after 6m58s

This commit is contained in:
2026-05-20 15:28:37 +03:30
parent 628f84c14b
commit ecdea4d07c
3 changed files with 31 additions and 3 deletions
Binary file not shown.
+31 -3
View File
@@ -27,12 +27,36 @@ jobs:
run: | run: |
git clone --depth 1 https://git.sabp.ir/sufi-chain/dev-ops-test.git . git clone --depth 1 https://git.sabp.ir/sufi-chain/dev-ops-test.git .
- name: Create NuGet.Config for HTTP BaGet
shell: bash
run: |
set -euo pipefail
if [ -z "${NUGET_SOURCE_URL:-}" ]; then
echo "NUGET_SOURCE_URL secret/env is required."
exit 1
fi
cat > NuGet.Config <<EOF
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<packageSources>
<clear />
<add key="baget" value="${NUGET_SOURCE_URL}" allowInsecureConnections="true" />
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" />
</packageSources>
</configuration>
EOF
echo "NuGet.Config created:"
cat NuGet.Config
- name: Restore selected projects - name: Restore selected projects
shell: bash shell: bash
run: | run: |
set -euo pipefail set -euo pipefail
for project in $PACKAGE_PROJECTS; do for project in $PACKAGE_PROJECTS; do
dotnet restore "$project" dotnet restore "$project" --configfile NuGet.Config
done done
- name: Build selected projects - name: Build selected projects
@@ -67,6 +91,7 @@ jobs:
NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }} NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }}
run: | run: |
set -euo pipefail set -euo pipefail
if [ -z "${NUGET_API_KEY:-}" ]; then if [ -z "${NUGET_API_KEY:-}" ]; then
echo "NUGET_API_KEY secret is required." echo "NUGET_API_KEY secret is required."
exit 1 exit 1
@@ -74,14 +99,17 @@ jobs:
shopt -s nullglob shopt -s nullglob
packages=("$PACKAGE_OUTPUT"/*.nupkg) packages=("$PACKAGE_OUTPUT"/*.nupkg)
if [ ${#packages[@]} -eq 0 ]; then if [ ${#packages[@]} -eq 0 ]; then
echo "No NuGet packages were produced." echo "No NuGet packages were produced."
exit 1 exit 1
fi fi
for package in "${packages[@]}"; do for package in "${packages[@]}"; do
echo "Pushing $package ..."
dotnet nuget push "$package" \ dotnet nuget push "$package" \
--source "$NUGET_SOURCE_URL" \ --source baget \
--api-key "$NUGET_API_KEY" \ --api-key "$NUGET_API_KEY" \
--skip-duplicate --skip-duplicate \
--configfile NuGet.Config
done done
Binary file not shown.