Skip to content

Commit 84e768f

Browse files
committed
Test
1 parent 676f13c commit 84e768f

File tree

1 file changed

+48
-2
lines changed

1 file changed

+48
-2
lines changed

.github/workflows/node.js.yml

Lines changed: 48 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,36 @@ jobs:
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+
3262
- name: Build Docker image
3363
uses: docker/build-push-action@v4
3464
with:
@@ -37,9 +67,25 @@ jobs:
3767
load: true
3868
tags: relisten2.tail09dbf.ts.net:32000/relistennet/relisten-web:latest
3969

40-
- name: Push to registry over Tailscale network
70+
- name: Push to registry using IP address
4171
run: |
42-
docker push relisten2.tail09dbf.ts.net:32000/relistennet/relisten-web:latest
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
79+
80+
# Configure Docker to use this insecure registry
81+
echo '{
82+
"insecure-registries": ["'$REGISTRY_IP:32000'"]
83+
}' | sudo tee /etc/docker/daemon.json
84+
sudo systemctl restart docker
85+
sleep 5
86+
87+
# Push with IP address
88+
docker push $REGISTRY_IP:32000/relistennet/relisten-web:latest
4389
4490
- name: Install kubectl
4591
uses: azure/setup-kubectl@v3

0 commit comments

Comments
 (0)