Add comprehensive debugging to Forgejo workflow
Some checks failed
Build and Push Docker Image / build-and-push (push) Failing after 36s
Some checks failed
Build and Push Docker Image / build-and-push (push) Failing after 36s
- Check DNS configuration and resolv.conf - Test DNS resolution with nslookup and dig - Test network connectivity with ping and curl - Show environment variables and git config - Attempt IP-based clone if DNS fails - Debug all network and DNS issues 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
547b232669
commit
86dacd2f09
1 changed files with 55 additions and 5 deletions
|
|
@ -8,18 +8,68 @@ on:
|
|||
jobs:
|
||||
build-and-push:
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
image: docker:latest
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
- name: Debug - Network and DNS Configuration
|
||||
run: |
|
||||
apk add --no-cache git
|
||||
git clone ${{ github.server_url }}/${{ github.repository }} .
|
||||
echo "=== Network Configuration ==="
|
||||
ip addr show
|
||||
echo ""
|
||||
echo "=== DNS Configuration ==="
|
||||
cat /etc/resolv.conf
|
||||
echo ""
|
||||
echo "=== Testing DNS Resolution ==="
|
||||
echo "Testing Google DNS:"
|
||||
nslookup google.com || echo "Failed to resolve google.com"
|
||||
echo ""
|
||||
echo "Testing forgejo.sivic.me:"
|
||||
nslookup forgejo.sivic.me || echo "Failed to resolve forgejo.sivic.me"
|
||||
echo ""
|
||||
echo "=== Testing with dig ==="
|
||||
apt-get update -qq && apt-get install -y -qq dnsutils
|
||||
dig forgejo.sivic.me
|
||||
dig @8.8.8.8 forgejo.sivic.me
|
||||
echo ""
|
||||
echo "=== Testing connectivity ==="
|
||||
ping -c 3 8.8.8.8 || echo "Cannot ping 8.8.8.8"
|
||||
echo ""
|
||||
echo "=== Testing HTTP access ==="
|
||||
curl -v https://forgejo.sivic.me 2>&1 | head -20 || echo "Failed to curl forgejo.sivic.me"
|
||||
|
||||
- name: Debug - Check current directory
|
||||
run: |
|
||||
echo "=== Current Directory ==="
|
||||
pwd
|
||||
ls -la
|
||||
echo ""
|
||||
echo "=== Git Configuration ==="
|
||||
git config --list || echo "Git not configured"
|
||||
echo ""
|
||||
echo "=== Environment Variables ==="
|
||||
echo "Git SHA: ${{ github.sha }}"
|
||||
echo "Repository: ${{ github.repository }}"
|
||||
echo "Actor: ${{ github.actor }}"
|
||||
echo "Server URL: ${{ github.server_url }}"
|
||||
|
||||
- name: Clone repository with debugging
|
||||
run: |
|
||||
echo "=== Attempting to clone ==="
|
||||
echo "URL: ${{ github.server_url }}/${{ github.repository }}"
|
||||
git clone ${{ github.server_url }}/${{ github.repository }} repo || {
|
||||
echo "Clone failed, trying with IP..."
|
||||
# Try to get the IP and clone with that
|
||||
FORGEJO_IP=$(dig +short forgejo.sivic.me | head -1)
|
||||
echo "Forgejo IP: $FORGEJO_IP"
|
||||
if [ -n "$FORGEJO_IP" ]; then
|
||||
git clone https://$FORGEJO_IP/kevinsivic/ratemyclient repo
|
||||
fi
|
||||
}
|
||||
cd repo
|
||||
git checkout ${{ github.sha }}
|
||||
|
||||
- name: Build Docker image
|
||||
run: |
|
||||
cd repo
|
||||
docker build -t forgejo.sivic.me/${{ github.repository }}:latest \
|
||||
-t forgejo.sivic.me/${{ github.repository }}:${{ github.sha }} .
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue