mirror of
https://github.com/actions/cache.git
synced 2026-02-01 04:15:08 +01:00
Fix resolution
This commit is contained in:
18
.github/workflows/workflow.yml
vendored
18
.github/workflows/workflow.yml
vendored
@@ -90,7 +90,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
container:
|
container:
|
||||||
image: ubuntu:latest
|
image: ubuntu:latest
|
||||||
options: --cap-add=NET_ADMIN --dns 127.0.0.1
|
options: --cap-add=NET_ADMIN
|
||||||
services:
|
services:
|
||||||
squid-proxy:
|
squid-proxy:
|
||||||
image: ubuntu/squid:latest
|
image: ubuntu/squid:latest
|
||||||
@@ -101,15 +101,18 @@ jobs:
|
|||||||
https_proxy: http://squid-proxy:3128
|
https_proxy: http://squid-proxy:3128
|
||||||
steps:
|
steps:
|
||||||
- name: Wait for proxy to be ready
|
- name: Wait for proxy to be ready
|
||||||
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
echo "Waiting for squid proxy to be ready..."
|
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
|
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!"
|
echo "Proxy is ready!"
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
echo "Attempt $i: Proxy not ready, waiting..."
|
echo "Attempt $i: Proxy not ready, waiting..."
|
||||||
sleep 1
|
sleep 2
|
||||||
done
|
done
|
||||||
echo "Proxy failed to become ready"
|
echo "Proxy failed to become ready"
|
||||||
exit 1
|
exit 1
|
||||||
@@ -165,7 +168,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
container:
|
container:
|
||||||
image: ubuntu:latest
|
image: ubuntu:latest
|
||||||
options: --cap-add=NET_ADMIN --dns 127.0.0.1
|
options: --cap-add=NET_ADMIN
|
||||||
services:
|
services:
|
||||||
squid-proxy:
|
squid-proxy:
|
||||||
image: ubuntu/squid:latest
|
image: ubuntu/squid:latest
|
||||||
@@ -176,15 +179,18 @@ jobs:
|
|||||||
https_proxy: http://squid-proxy:3128
|
https_proxy: http://squid-proxy:3128
|
||||||
steps:
|
steps:
|
||||||
- name: Wait for proxy to be ready
|
- name: Wait for proxy to be ready
|
||||||
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
echo "Waiting for squid proxy to be ready..."
|
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
|
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!"
|
echo "Proxy is ready!"
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
echo "Attempt $i: Proxy not ready, waiting..."
|
echo "Attempt $i: Proxy not ready, waiting..."
|
||||||
sleep 1
|
sleep 2
|
||||||
done
|
done
|
||||||
echo "Proxy failed to become ready"
|
echo "Proxy failed to become ready"
|
||||||
exit 1
|
exit 1
|
||||||
|
|||||||
Reference in New Issue
Block a user