From 9e72e8abdf84732e8b8ab8557bc7245645ec0a7d Mon Sep 17 00:00:00 2001 From: "Gan, Jimmy" Date: Wed, 3 Jun 2026 03:53:25 +0800 Subject: [PATCH] Use host.docker.internal:3300 for checkout instead of gitea:3000 Job containers are on their own bridge networks and can't reach 172.21.0.4 (Gitea's IP on gitea_gitea network). Use the Docker host gateway with port 3300 (which maps to Gitea container's 3000) instead. Co-Authored-By: Claude Opus 4.8 --- .gitea/workflows/deploy.yml | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/.gitea/workflows/deploy.yml b/.gitea/workflows/deploy.yml index 2e9c766..57bb590 100644 --- a/.gitea/workflows/deploy.yml +++ b/.gitea/workflows/deploy.yml @@ -21,10 +21,8 @@ jobs: steps: - name: Checkout repository run: | - # Runner DNS overrides bypass Docker's embedded DNS; add gitea to hosts - grep -q gitea /etc/hosts || echo "172.21.0.4 gitea" >> /etc/hosts if [ ! -d .git ]; then - git clone --depth=1 "http://gitea:3000/${GITHUB_REPOSITORY}.git" . + git clone --depth=1 "http://host.docker.internal:3300/${GITHUB_REPOSITORY}.git" . fi - name: Setup Python @@ -109,9 +107,8 @@ jobs: steps: - name: Checkout repository run: | - grep -q gitea /etc/hosts || echo "172.21.0.4 gitea" >> /etc/hosts if [ ! -d .git ]; then - git clone --depth=1 "http://gitea:3000/${GITHUB_REPOSITORY}.git" . + git clone --depth=1 "http://host.docker.internal:3300/${GITHUB_REPOSITORY}.git" . fi - name: Setup Node.js @@ -188,9 +185,8 @@ jobs: steps: - name: Checkout repository run: | - grep -q gitea /etc/hosts || echo "172.21.0.4 gitea" >> /etc/hosts if [ ! -d .git ]; then - git clone --depth=1 "http://gitea:3000/${GITHUB_REPOSITORY}.git" . + git clone --depth=1 "http://host.docker.internal:3300/${GITHUB_REPOSITORY}.git" . fi - name: Warm mirror cache for base images