CI: жёстко пинить git.dev на внутренний IP и форсировать netdns=go
This commit is contained in:
@@ -179,6 +179,9 @@ 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.
|
||||
# Replace old mapping if present and pin host to internal IP.
|
||||
grep -v "[[:space:]]${GITEA_HOST}$" /etc/hosts > /tmp/hosts.cleaned || true
|
||||
cat /tmp/hosts.cleaned > /etc/hosts
|
||||
echo "${REGISTRY_IP} ${GITEA_HOST}" >> /etc/hosts
|
||||
getent hosts "${GITEA_HOST}" || true
|
||||
|
||||
@@ -187,6 +190,8 @@ jobs:
|
||||
unset http_proxy https_proxy HTTP_PROXY HTTPS_PROXY all_proxy ALL_PROXY
|
||||
export NO_PROXY="${NO_PROXY:-},${REGISTRY_IP},${GITEA_HOST}"
|
||||
export no_proxy="${no_proxy:-},${REGISTRY_IP},${GITEA_HOST}"
|
||||
# Force pure Go resolver for crane to honor /etc/hosts mapping first.
|
||||
export GODEBUG=netdns=go
|
||||
|
||||
echo "${REGISTRY_PASSWORD}" | ./crane auth login --insecure "${REGISTRY_HOST}" -u "${REGISTRY_USER}" --password-stdin
|
||||
|
||||
|
||||
Reference in New Issue
Block a user