CI: отключить proxy для registry auth и добавить NO_PROXY
Some checks failed
CI/CD Pipeline / Code Quality Checks (push) Successful in 1m50s
CI/CD Pipeline / Run Tests (push) Successful in 2m8s
CI/CD Pipeline / Build & Push Images (push) Failing after 39s

This commit is contained in:
2026-02-18 14:09:53 +01:00
parent 674a769a11
commit f53d691de3

View File

@@ -178,6 +178,13 @@ jobs:
# 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
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}"
echo "${REGISTRY_PASSWORD}" | ./crane auth login --insecure "${REGISTRY_HOST}" -u "${REGISTRY_USER}" --password-stdin