Skip to content

Test Registry

Test Registry #1732

Workflow file for this run

on:
push:
schedule:
- cron: '0 0 */1 * *'
workflow_dispatch:
name: Test Registry
jobs:
ci:
runs-on: ubuntu-latest
steps:
- uses: docker-practice/actions-setup-docker@master
with:
docker_version: "20.10"
docker_channel: test
docker_buildx: false
- run: docker version
- run: docker info
- name: Test
run: |
registrys="
docker.io
registry-1.docker.io
registry.hub.docker.com
mirror.baidubce.com
hub-mirror.c.163.com
docker.mirrors.ustc.edu.cn
mirror.gcr.io
dockerproxy.com
$ALIYUN_MIRROR
"
image="library/nginx:1.25.1-alpine"
for registry in $registrys
do
echo ::group::Test $registry/$image
docker pull $registry/$image \
&& (echo -e "\033[32m$registry is good\033[0m" \
; echo "::warning file=README.md,line=1,col=0::OK [ $registry ] is good") \
|| (echo -e "\033[31m$registry is outdated\033[0m" \
; echo "::error file=README.md,line=1,col=0::X [ $registry ] is outdated")
docker rmi $registry/$image || true
echo ::endgroup::
done
env:
ALIYUN_MIRROR: ${{secrets.ALIYUN_MIRROR}}