2929 oauth-secret : ${{ secrets.TAILSCALE_OAUTH_SECRET }}
3030 tags : tag:ci
3131
32- - name : Configure Tailscale DNS and test connection
33- run : |
34- # Wait for Tailscale to fully initialize
35- sleep 5
36-
37- # Display Tailscale status for debugging
38- echo "Tailscale status:"
39- tailscale status
40-
41- # Use nslookup to debug DNS issues
42- echo "Checking DNS resolution through Tailscale..."
43- # Get Tailscale DNS server if available
44- TAILSCALE_DNS=$(tailscale status --json | jq -r '.Self.DNSServers[]' 2>/dev/null | head -1)
45-
46- if [ -n "$TAILSCALE_DNS" ]; then
47- echo "Using Tailscale DNS server: $TAILSCALE_DNS"
48- nslookup relisten2.tail09dbf.ts.net $TAILSCALE_DNS || echo "DNS lookup failed but continuing"
49- else
50- echo "No Tailscale DNS server found"
51- fi
52-
53- # Get direct IP address from tailscale
54- echo "Looking up host in Tailscale network..."
55- tailscale ip -4 relisten2 || echo "Tailscale ip lookup failed"
56-
57- # Manual IP address as fallback
58- echo "Setting registry address as environment variable"
59- # Set a manual IP address if you know it (replace with your actual IP)
60- echo "REGISTRY_ADDRESS=100.x.y.z" >> $GITHUB_ENV
61-
6232 - name : Build Docker image
6333 uses : docker/build-push-action@v4
6434 with :
@@ -69,23 +39,19 @@ jobs:
6939
7040 - name : Push to registry using IP address
7141 run : |
72- # Use the environment variable set earlier (replace with actual IP if you know it)
73- # If you don't know the IP yet, set it to a placeholder and update after testing
74- REGISTRY_IP="${{ env.REGISTRY_ADDRESS }}"
75- echo "Using registry IP: $REGISTRY_IP"
76-
77- # Tag image with the IP address
78- docker tag relistennet/relisten-web:latest $REGISTRY_IP:32000/relistennet/relisten-web:latest
42+ # Use the tailscale DNS name directly
43+ REGISTRY_ADDRESS="relisten2.tail09dbf.ts.net"
44+ echo "Using registry: $REGISTRY_ADDRESS:32000"
7945
8046 # Configure Docker to use this insecure registry
8147 echo '{
82- "insecure-registries": ["'$REGISTRY_IP :32000'"]
48+ "insecure-registries": ["'$REGISTRY_ADDRESS :32000'"]
8349 }' | sudo tee /etc/docker/daemon.json
8450 sudo systemctl restart docker
8551 sleep 5
8652
87- # Push with IP address
88- docker push $REGISTRY_IP :32000/relistennet/relisten-web:latest
53+ # Push the image (already properly tagged from the build step)
54+ docker push $REGISTRY_ADDRESS :32000/relistennet/relisten-web:latest
8955
9056 - name : Install kubectl
9157 uses : azure/setup-kubectl@v3
0 commit comments