Check the runner’s public IP from the workflow
A deploy can succeed from your laptop and fail in GitHub Actions even when it uses the same credentials. If the destination filters by source IP, run the check inside the failing job, right before the deploy step. The result shows which public address reached the IP check endpoint.
- name: Check runner egress IP
shell: bash
run: |
ip=$(curl -fsS --max-time 10 https://ipcheckhq.com/ip)
printf 'Runner egress IP: %s\n' "$ip"If the deploy runs inside a container or a separate worker, run the check there. A shell step on the runner host can take a different route from the process inside the container. If your job logs are public and you use a private runner, keep the address in a restricted diagnostic log.
Find out why the IP allowlist rejected the job
Compare the address from the workflow with the failed request in the destination logs. Match the timestamp and, when available, the request ID. If the destination records a different source address, check which network path and IP version the deploy client used.
| What you observe | What to check next |
|---|---|
| Destination logs show the same IP, outside the approved range | Check whether the job is using the expected runner group and outbound gateway. |
| Destination logs show a different IP | Compare the deploy client’s proxy settings and bypass rules with the diagnostic request. If the target is private, check its route separately. |
| The IP changes across runs | Confirm that each run used the same runner pool. Standard GitHub-hosted runners use dynamic addresses. |
| The destination logs show an approved IP | Check the destination’s deny reason and the rule applied to that endpoint. Authentication can still fail after the network check passes. |
Compare IPv4 and IPv6 separately if the deploy host supports both. This IP check endpoint measures IPv4. If the deploy client reaches its target over IPv6, use the destination logs or a diagnostic endpoint on that same IPv6 route. With a proxy, curl’s address-family flags apply to its connection to the proxy.
Choose stable egress for production deploys
Standard GitHub-hosted runners receive dynamic IPs. Adding the address from a passing run can break the next deploy. GitHub recommends a larger runner with static ranges or a self-hosted runner for resources that require IP allowlisting. For what a lookup can and cannot tell you about a static or dynamic address, see the static vs dynamic IP address guide.
- GitHub Enterprise Cloud can assign static ranges to eligible larger runner pools. Add the assigned range to the destination allowlist, then verify it from a job using that pool.
- Run the job in a network you control and route its public IPv4 traffic through a gateway with a reserved address. On AWS, a public NAT gateway uses its Elastic IP when traffic goes through the VPC’s internet gateway.
Validate the result from each runner pool or region that can deploy. Check one real request in the destination logs before you remove a previous allowlist entry. Keep the outbound IP check alongside the deploy so the next failure gives you a timestamp and an address to investigate.
