From 3fe8de2e32bffc27931bf80b6d3e97370581c925 Mon Sep 17 00:00:00 2001 From: adtpdn Date: Fri, 3 Jul 2026 18:04:13 +0800 Subject: [PATCH] chore(ci): alias magicdns thunderobot.tail5d6e8e.ts.net and strip port 222 --- .gitea/workflows/ci.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index 88b162a..947803b 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -26,14 +26,16 @@ jobs: run: | mkdir -p ~/.ssh ssh-keyscan -p 22 172.18.0.2 >> ~/.ssh/known_hosts || true - # Direct IP routing avoids dns completely. The API returns SSH_PORT=222 but internally Gitea listens on 22. - # So we MUST map any connection to the internal port 22. + # Route all possible hostnames Gitea might hand out via API back to the internal docker port 22 printf "Host gitea\n HostName 172.18.0.2\n Port 22\n StrictHostKeyChecking no\n" > ~/.ssh/config printf "Host thunderobot\n HostName 172.18.0.2\n Port 22\n StrictHostKeyChecking no\n" >> ~/.ssh/config + printf "Host thunderobot.tail5d6e8e.ts.net\n HostName 172.18.0.2\n Port 22\n StrictHostKeyChecking no\n" >> ~/.ssh/config - # Force checkout to use the mapped config + # Force checkout to rewrite port 222 down to 22 git config --global url."ssh://git@gitea/".insteadOf "ssh://git@gitea:222/" git config --global url."ssh://git@gitea/".insteadOf "git@gitea:222:" + git config --global url."ssh://git@thunderobot.tail5d6e8e.ts.net/".insteadOf "ssh://git@thunderobot.tail5d6e8e.ts.net:222/" + git config --global url."ssh://git@thunderobot.tail5d6e8e.ts.net/".insteadOf "git@thunderobot.tail5d6e8e.ts.net:222:" chmod 600 ~/.ssh/config - name: Checkout Code