From 04d9e6bf40d8555b2981478708e35f60caac0563 Mon Sep 17 00:00:00 2001 From: Aleksandr Meshchriakov Date: Mon, 2 Feb 2026 14:03:10 +0100 Subject: [PATCH] fix(ci): use domain name for Gitea container registry --- .gitea/workflows/ci-cd.yml | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/.gitea/workflows/ci-cd.yml b/.gitea/workflows/ci-cd.yml index 3631813..1f2eaf8 100644 --- a/.gitea/workflows/ci-cd.yml +++ b/.gitea/workflows/ci-cd.yml @@ -123,21 +123,24 @@ jobs: - name: Install crane and build images run: | - # Install crane for pushing to insecure HTTP registry + # Install crane for pushing to Gitea container registry curl -sL https://github.com/google/go-containerregistry/releases/download/v0.19.0/go-containerregistry_Linux_x86_64.tar.gz | tar xz crane chmod +x crane BRANCH_TAG=$(echo ${GITHUB_REF_NAME} | sed 's/\//-/g') SHA_SHORT=$(echo ${GITHUB_SHA} | cut -c1-7) - # Gitea container registry is on HTTP at 10.10.0.10:3000 - REGISTRY="10.10.0.10:3000/${{ github.repository_owner }}" - # Build web image locally + # Gitea redirects auth to domain name, so use it everywhere + REGISTRY_HOST="git.dev.nii-ecos.ru" + REGISTRY="${REGISTRY_HOST}/${{ github.repository_owner }}" + + # Login to Gitea container registry (--insecure for self-signed cert) + ./crane auth login --insecure ${REGISTRY_HOST} -u ${{ gitea.actor }} -p ${{ gitea.token }} + + # Build and push web image docker build -f ./docker/Dockerfile.web -t mostovik-web:local . docker save mostovik-web:local -o /tmp/web.tar - # Push with crane (supports insecure HTTP) - ./crane auth login --insecure 10.10.0.10:3000 -u ${{ gitea.actor }} -p ${{ gitea.token }} ./crane push --insecure /tmp/web.tar ${REGISTRY}/mostovik-web:${BRANCH_TAG} ./crane push --insecure /tmp/web.tar ${REGISTRY}/mostovik-web:${BRANCH_TAG}-${SHA_SHORT} @@ -145,7 +148,7 @@ jobs: ./crane push --insecure /tmp/web.tar ${REGISTRY}/mostovik-web:latest fi - # Build celery image locally + # Build and push celery image docker build -f ./docker/Dockerfile.celery -t mostovik-celery:local . docker save mostovik-celery:local -o /tmp/celery.tar @@ -158,4 +161,4 @@ jobs: - name: Image summary run: | - echo "Images pushed to 10.10.0.10:3000/${{ github.repository_owner }}/" + echo "Images pushed to git.dev.nii-ecos.ru/${{ github.repository_owner }}/"