fix: CI deploy workflow registry mirror access #40
@@ -25,7 +25,8 @@ jobs:
|
|||||||
- name: Warm mirror cache for base images
|
- name: Warm mirror cache for base images
|
||||||
run: |
|
run: |
|
||||||
set -u
|
set -u
|
||||||
mirror_host="127.0.0.1:5501"
|
# Use host.docker.internal or NAS IP to access registry mirror from container
|
||||||
|
mirror_host="100.78.131.124:5501"
|
||||||
|
|
||||||
if command -v curl >/dev/null 2>&1; then
|
if command -v curl >/dev/null 2>&1; then
|
||||||
if curl -fsS "http://${mirror_host}/v2/" >/dev/null; then
|
if curl -fsS "http://${mirror_host}/v2/" >/dev/null; then
|
||||||
@@ -41,7 +42,7 @@ jobs:
|
|||||||
image_ref="$1"
|
image_ref="$1"
|
||||||
mirror_ref="${mirror_host}/library/${image_ref}"
|
mirror_ref="${mirror_host}/library/${image_ref}"
|
||||||
echo "Attempting mirror pre-pull: ${mirror_ref}"
|
echo "Attempting mirror pre-pull: ${mirror_ref}"
|
||||||
if timeout 60 docker pull "${mirror_ref}"; then
|
if timeout 120 docker pull "${mirror_ref}"; then
|
||||||
docker tag "${mirror_ref}" "${image_ref}"
|
docker tag "${mirror_ref}" "${image_ref}"
|
||||||
echo "Mirror pre-pull succeeded for ${image_ref}"
|
echo "Mirror pre-pull succeeded for ${image_ref}"
|
||||||
else
|
else
|
||||||
|
|||||||
Reference in New Issue
Block a user