Files
test-repository/.gitea/workflows/test.yml
RJ 4f755ae048
All checks were successful
Network Diagnostic / network-test (push) Successful in 24s
🔎 test with bridge network
2025-10-27 16:34:02 +02:00

94 lines
2.6 KiB
YAML
Raw Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
name: Network Diagnostic
on: [push, workflow_dispatch]
jobs:
network-test:
runs-on: ubuntu-latest
steps:
- name: 0. Install Network Tools
run: |
echo "=== Installing network diagnostic tools ==="
apt-get update -qq
apt-get install -y -qq iproute2 iputils-ping dnsutils curl net-tools
echo "Tools installed successfully"
echo ""
- name: 1. Basic Info
run: |
echo "=== Container Info ==="
hostname
whoami
pwd
echo ""
- name: 2. Check /etc/hosts
run: |
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 ""