From acf2f1f76affe1ef80eee8e56dfddd3b3e5f0fba Mon Sep 17 00:00:00 2001 From: Bassem Dghaidi <568794+Link-@users.noreply.github.com> Date: Fri, 30 Jan 2026 02:03:12 -0800 Subject: [PATCH] Fix resolution --- .github/workflows/workflow.yml | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml index 59eb05b..2ba4d30 100644 --- a/.github/workflows/workflow.yml +++ b/.github/workflows/workflow.yml @@ -90,7 +90,7 @@ jobs: runs-on: ubuntu-latest container: image: ubuntu:latest - options: --cap-add=NET_ADMIN --dns 127.0.0.1 + options: --cap-add=NET_ADMIN services: squid-proxy: image: ubuntu/squid:latest @@ -101,15 +101,18 @@ jobs: https_proxy: http://squid-proxy:3128 steps: - name: Wait for proxy to be ready + shell: bash run: | echo "Waiting for squid proxy to be ready..." + echo "Resolving squid-proxy hostname:" + getent hosts squid-proxy || echo "DNS resolution failed" for i in $(seq 1 30); do - if nc -z squid-proxy 3128 2>/dev/null; then + if (echo > /dev/tcp/squid-proxy/3128) 2>/dev/null; then echo "Proxy is ready!" exit 0 fi echo "Attempt $i: Proxy not ready, waiting..." - sleep 1 + sleep 2 done echo "Proxy failed to become ready" exit 1 @@ -165,7 +168,7 @@ jobs: runs-on: ubuntu-latest container: image: ubuntu:latest - options: --cap-add=NET_ADMIN --dns 127.0.0.1 + options: --cap-add=NET_ADMIN services: squid-proxy: image: ubuntu/squid:latest @@ -176,15 +179,18 @@ jobs: https_proxy: http://squid-proxy:3128 steps: - name: Wait for proxy to be ready + shell: bash run: | echo "Waiting for squid proxy to be ready..." + echo "Resolving squid-proxy hostname:" + getent hosts squid-proxy || echo "DNS resolution failed" for i in $(seq 1 30); do - if nc -z squid-proxy 3128 2>/dev/null; then + if (echo > /dev/tcp/squid-proxy/3128) 2>/dev/null; then echo "Proxy is ready!" exit 0 fi echo "Attempt $i: Proxy not ready, waiting..." - sleep 1 + sleep 2 done echo "Proxy failed to become ready" exit 1