From b74497b37fbbe944f7e563b3718bd9ba6db0023e Mon Sep 17 00:00:00 2001 From: RJ <> Date: Mon, 27 Oct 2025 15:02:28 +0200 Subject: [PATCH] Add comprehensive network diagnostic workflow MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Adaugă 12 steps de diagnostic pentru a înțelege exact ce vede job container-ul: - /etc/hosts și DNS config - nslookup/dig/ping tests pentru hostname "gitea" - Network interfaces și routing - Test HTTP connections (hostname vs IP direct) - Environment variables - Comparație între gitea:3000 și 172.18.0.4:3000 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- .gitea/workflows/test.yml | 96 +++++++++++++++++++++++++++++++-------- 1 file changed, 78 insertions(+), 18 deletions(-) diff --git a/.gitea/workflows/test.yml b/.gitea/workflows/test.yml index 5c0eb7b..fa87699 100644 --- a/.gitea/workflows/test.yml +++ b/.gitea/workflows/test.yml @@ -1,25 +1,85 @@ -name: Test CI Pipeline -on: [push] +name: Network Diagnostic + +on: [push, workflow_dispatch] jobs: - test: + network-test: runs-on: ubuntu-latest + steps: - - name: Checkout code - uses: actions/checkout@v3 - - - name: Run test + - name: 1. Basic Info run: | - echo "Hello from Gitea Actions!" - echo "Runner: $(hostname)" - echo "Working directory: $(pwd)" - echo "👋 runner works" - echo "👋 changed act runner variable" - echo "👋 testing docker network" - echo "👋 testing docker network with direct ip" - ls -la + echo "=== Container Info ===" + hostname + whoami + pwd + echo "" - - name: Test Docker + - name: 2. Check /etc/hosts run: | - docker --version - echo "Docker is available in CI!" + echo "=== /etc/hosts Contents ===" + cat /etc/hosts + echo "" + + - name: 3. Check DNS Config + run: | + echo "=== /etc/resolv.conf ===" + cat /etc/resolv.conf + echo "" + + - name: 4. Test DNS Resolution for 'gitea' + run: | + echo "=== nslookup gitea ===" + nslookup gitea || echo "nslookup failed with exit code: $?" + echo "" + + - name: 5. Test DNS with dig (if available) + run: | + echo "=== dig gitea ===" + dig gitea @127.0.0.11 || echo "dig not available or failed" + echo "" + + - name: 6. Test Ping + run: | + echo "=== ping -c 2 gitea ===" + ping -c 2 gitea || echo "ping failed with exit code: $?" + echo "" + + - name: 7. Network Interfaces + run: | + echo "=== ip addr show ===" + ip addr show + echo "" + + - name: 8. Routing Table + run: | + echo "=== ip route ===" + ip route + echo "" + + - name: 9. Test HTTP Connection to gitea:3000 + run: | + echo "=== curl -v gitea:3000 ===" + curl -v --max-time 5 http://gitea:3000/ || echo "curl failed with exit code: $?" + echo "" + + - name: 10. Environment Variables + run: | + echo "=== Gitea-related ENV vars ===" + env | grep -i git || echo "No GITEA env vars" + echo "" + echo "=== All ENV vars ===" + env | sort + + - name: 11. Docker Network Info (if docker available) + run: | + echo "=== Docker Info ===" + docker network ls 2>/dev/null || echo "Docker not available in job container" + echo "" + + - name: 12. Test Direct IP Connection + run: | + echo "=== Test connection to Gitea IP directly ===" + echo "Trying 172.18.0.4:3000 (known Gitea IP)..." + curl -v --max-time 5 http://172.18.0.4:3000/ || echo "Direct IP connection failed with exit code: $?" + echo ""