From 2292f8c34434a12e5e900783626b542606b9aae6 Mon Sep 17 00:00:00 2001 From: sova-ci Date: Thu, 28 May 2026 01:03:38 +0300 Subject: [PATCH] fix(ci): push images via internal Gitea registry --- .gitea/workflows/build.yml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/.gitea/workflows/build.yml b/.gitea/workflows/build.yml index 2ba2b30..d076f21 100644 --- a/.gitea/workflows/build.yml +++ b/.gitea/workflows/build.yml @@ -8,8 +8,8 @@ on: branches: [main] env: - REGISTRY: git.sova.local - IMAGE: git.sova.local/sova/adminpanel + REGISTRY: gitea-http.gitea.svc.cluster.local:3000 + IMAGE: gitea-http.gitea.svc.cluster.local:3000/sova/adminpanel jobs: test: @@ -48,10 +48,8 @@ jobs: - uses: actions/checkout@v4 - name: Docker login env: - HOST_IP: ${{ secrets.HOST_IP }} REGISTRY_PASSWORD: ${{ secrets.REGISTRY_PASSWORD }} run: | - echo "${HOST_IP} git.sova.local" | tee -a /etc/hosts echo "${REGISTRY_PASSWORD}" | docker login "$REGISTRY" -u sova-ci --password-stdin - name: Build and push run: | @@ -82,9 +80,13 @@ jobs: git config user.email "ci-bot@sova.local" git config user.name "sova-ci" MAX_RETRIES=5 + curl -sSL -o /usr/local/bin/yq https://github.com/mikefarah/yq/releases/download/v4.44.3/yq_linux_amd64 + chmod +x /usr/local/bin/yq for attempt in $(seq 1 $MAX_RETRIES); do git pull --rebase origin main + yq -i ".image.repository = \"${IMAGE}\"" "apps/adminpanel/values-${ENV}.yaml" yq -i ".image.tag = \"${TAG}\"" "apps/adminpanel/values-${ENV}.yaml" + yq -i ".image.pullPolicy = \"IfNotPresent\"" "apps/adminpanel/values-${ENV}.yaml" git add "apps/adminpanel/values-${ENV}.yaml" git diff --cached --quiet && { echo "No changes"; exit 0; } git commit -m "chore(adminpanel): bump ${ENV} to ${TAG}"