update ci
Release Docker Image / build-and-push (release) Failing after 1m10s
Release NuGet Packages / pack-and-push (release) Failing after 3s

This commit is contained in:
2026-05-20 13:53:08 +03:30
parent 187b6163c9
commit babcb85254
3 changed files with 16 additions and 29 deletions
+13 -23
View File
@@ -15,24 +15,16 @@ jobs:
build-and-push:
runs-on: ubuntu-latest
container:
image: mcr-mirror.liara.ir/dotnet/sdk:10.0
image: mcr-mirror.liara.ir/dotnet/sdk:9.0
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Docker CLI
shell: bash
run: |
set -euo pipefail
apt-get update
apt-get install -y docker.io
- name: Login to Harbor
- name: Build and push image
shell: bash
env:
HARBOR_USERNAME: ${{ secrets.HARBOR_USERNAME }}
HARBOR_PASSWORD: ${{ secrets.HARBOR_PASSWORD }}
DOTNET_CONTAINER_REGISTRY_UNAME: ${{ secrets.HARBOR_USERNAME }}
DOTNET_CONTAINER_REGISTRY_PWORD: ${{ secrets.HARBOR_PASSWORD }}
run: |
set -euo pipefail
if [ -z "${HARBOR_USERNAME:-}" ] || [ -z "${HARBOR_PASSWORD:-}" ]; then
@@ -40,16 +32,14 @@ jobs:
exit 1
fi
echo "$HARBOR_PASSWORD" | docker login "$REGISTRY" --username "$HARBOR_USERNAME" --password-stdin
- name: Build and push image
shell: bash
run: |
set -euo pipefail
tag="${RELEASE_TAG:-$REF_NAME}"
tag="${tag#v}"
image="$REGISTRY/$IMAGE_NAME"
docker build --pull -t "$image:$tag" -t "$image:latest" .
docker push "$image:$tag"
docker push "$image:latest"
dotnet publish DevOpsTest.csproj \
--configuration Release \
--os linux \
--arch x64 \
/t:PublishContainer \
-p:ContainerRegistry="$REGISTRY" \
-p:ContainerRepository="$IMAGE_NAME" \
-p:ContainerBaseImage=mcr-mirror.liara.ir/dotnet/aspnet:10.0 \
-p:ContainerImageTags="$tag;latest"
+1 -4
View File
@@ -18,12 +18,9 @@ jobs:
pack-and-push:
runs-on: ubuntu-latest
container:
image: mcr-mirror.liara.ir/dotnet/sdk:10.0
image: mcr-mirror.liara.ir/dotnet/sdk:9.0
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Restore selected projects
shell: bash
run: |