ratemyclient/.forgejo/workflows/docker-build.yml

70 lines
2.5 KiB
YAML
Raw Normal View History

name: Build and Push Docker Image
on:
push:
branches:
- main
jobs:
build-and-push:
runs-on: ubuntu-latest
steps:
- name: Quick Network Test (no installs)
run: |
echo "=== DNS Configuration ==="
cat /etc/resolv.conf || echo "Cannot read resolv.conf"
echo ""
echo "=== Hosts file ==="
cat /etc/hosts || echo "Cannot read hosts"
echo ""
echo "=== Can we reach the internet? ==="
timeout 5 wget -O- http://google.com 2>&1 | head -5 || echo "Cannot reach google.com"
echo ""
echo "=== Can we reach Forgejo? ==="
timeout 5 wget -O- https://forgejo.sivic.me 2>&1 | head -5 || echo "Cannot reach forgejo.sivic.me"
echo ""
echo "=== Environment ==="
echo "Repository: ${{ github.repository }}"
echo "Server URL: ${{ github.server_url }}"
echo ""
echo "=== Network interfaces ==="
cat /proc/net/dev || echo "Cannot read network devices"
echo ""
echo "=== Default route ==="
cat /proc/net/route || echo "Cannot read routing table"
- name: Test if we're online at all
run: |
echo "Testing basic connectivity..."
# Try to connect to Google's DNS
timeout 5 bash -c 'cat < /dev/null > /dev/tcp/8.8.8.8/53' 2>&1 && echo "Can reach 8.8.8.8:53" || echo "CANNOT reach 8.8.8.8:53"
# Try to connect to Google HTTP
timeout 5 bash -c 'cat < /dev/null > /dev/tcp/google.com/80' 2>&1 && echo "Can reach google.com:80" || echo "CANNOT reach google.com:80"
# Try to connect to Forgejo
timeout 5 bash -c 'cat < /dev/null > /dev/tcp/forgejo.sivic.me/443' 2>&1 && echo "Can reach forgejo.sivic.me:443" || echo "CANNOT reach forgejo.sivic.me:443"
- name: Stop here and report
run: |
echo ""
echo "================================================================"
echo "DIAGNOSIS:"
echo "If you cannot reach 8.8.8.8:53, your runner has NO internet access"
echo "This is a runner configuration issue, not a DNS issue"
echo ""
echo "Fix: Check your Forgejo runner network configuration"
echo "- Is the runner container using host networking?"
echo "- Does the host have internet access?"
echo "- Are there firewall rules blocking the runner?"
echo "================================================================"
exit 1