Skip to content

Commit 04c5d73

Browse files
TGJLSclaude
andcommitted
Fix Windows IP: match vEthernet adapter (named 'nat' not 'WSL' on runner)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 1a73143 commit 04c5d73

1 file changed

Lines changed: 2 additions & 12 deletions

File tree

.github/workflows/test.yaml

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -160,22 +160,12 @@ jobs:
160160
161161
# ── WSL: SSH setup + config + run ────────────────────────────────────────
162162

163-
- name: Debug network
164-
shell: wsl-bash {0}
165-
run: |
166-
echo "=== ip route ==="
167-
ip route
168-
echo "=== ipconfig ==="
169-
cmd.exe /c ipconfig 2>/dev/null | tr -d '\r'
170-
echo "=== parsed WINDOWS_IP ==="
171-
cmd.exe /c ipconfig 2>/dev/null | tr -d '\r' | awk '/WSL/{f=1} f && /IPv4 Address/{print $NF; exit}'
172-
173163
- name: Generate SSH keypair and install on Windows
174164
shell: wsl-bash {0}
175165
run: |
176166
ssh-keygen -t ed25519 -N "" -f ~/.ssh/ci_key
177167
178-
WINDOWS_IP=$(cmd.exe /c ipconfig 2>/dev/null | tr -d '\r' | awk '/WSL/{f=1} f && /IPv4 Address/{print $NF; exit}')
168+
WINDOWS_IP=$(cmd.exe /c ipconfig 2>/dev/null | tr -d '\r' | awk '/vEthernet/{f=1} f && /IPv4 Address/{print $NF; exit}')
179169
180170
sshpass -p "$CI_PASS" ssh-copy-id \
181171
-i ~/.ssh/ci_key.pub \
@@ -187,7 +177,7 @@ jobs:
187177
run: |
188178
# Windows → WSL: use the WSL veth IP so the beacon can call home
189179
WSL_IP=$(hostname -I | awk '{print $1}')
190-
WINDOWS_IP=$(cmd.exe /c ipconfig 2>/dev/null | tr -d '\r' | awk '/WSL/{f=1} f && /IPv4 Address/{print $NF; exit}')
180+
WINDOWS_IP=$(cmd.exe /c ipconfig 2>/dev/null | tr -d '\r' | awk '/vEthernet/{f=1} f && /IPv4 Address/{print $NF; exit}')
191181
192182
cat > /tmp/ci_config.yaml << EOF
193183
server:

0 commit comments

Comments
 (0)