From f0b39ca0d6d412d2206ae7c28d36129a9529f055 Mon Sep 17 00:00:00 2001 From: Aleksandr Meshchriakov Date: Wed, 18 Feb 2026 16:20:45 +0100 Subject: [PATCH] =?UTF-8?q?CI:=20=D0=B8=D1=81=D0=BF=D0=BE=D0=BB=D1=8C?= =?UTF-8?q?=D0=B7=D0=BE=D0=B2=D0=B0=D1=82=D1=8C=20IP=20=D0=B8=D0=B7=20REGI?= =?UTF-8?q?STRY=5FHOST=20=D0=B4=D0=BB=D1=8F=20token=20endpoint=20=D1=80?= =?UTF-8?q?=D0=B5=D0=B7=D0=BE=D0=BB=D0=B2=D0=B8=D0=BD=D0=B3=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitea/workflows/ci-cd.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.gitea/workflows/ci-cd.yml b/.gitea/workflows/ci-cd.yml index 7edc474..8f3a32f 100644 --- a/.gitea/workflows/ci-cd.yml +++ b/.gitea/workflows/ci-cd.yml @@ -169,22 +169,24 @@ jobs: SHA_SHORT=$(echo "${GITHUB_SHA}" | cut -c1-7) REPO_OWNER="${GITHUB_REPOSITORY%%/*}" REGISTRY="${REGISTRY_HOST}/${REPO_OWNER}" + REGISTRY_IP="${REGISTRY_HOST%%:*}" GITEA_HOST=$(echo "${GITHUB_SERVER_URL}" | sed -E 's#https?://([^/:]+).*#\1#') echo "Registry: ${REGISTRY_HOST}" + echo "Registry IP: ${REGISTRY_IP}" echo "Actor: ${GITHUB_ACTOR}" echo "Gitea host: ${GITEA_HOST}" # Ensure token endpoint host resolves to internal network IP from runner. # Registry auth flow may redirect to ${GITEA_HOST} even when pushing to REGISTRY_HOST. - echo "10.10.0.10 ${GITEA_HOST}" >> /etc/hosts + echo "${REGISTRY_IP} ${GITEA_HOST}" >> /etc/hosts getent hosts "${GITEA_HOST}" || true # Some runners have outbound proxy env configured; force direct access # to internal registry/gitea hosts for auth flow. unset http_proxy https_proxy HTTP_PROXY HTTPS_PROXY all_proxy ALL_PROXY - export NO_PROXY="${NO_PROXY:-},10.10.0.10,${GITEA_HOST}" - export no_proxy="${no_proxy:-},10.10.0.10,${GITEA_HOST}" + export NO_PROXY="${NO_PROXY:-},${REGISTRY_IP},${GITEA_HOST}" + export no_proxy="${no_proxy:-},${REGISTRY_IP},${GITEA_HOST}" echo "${REGISTRY_PASSWORD}" | ./crane auth login --insecure "${REGISTRY_HOST}" -u "${REGISTRY_USER}" --password-stdin