-
-
Notifications
You must be signed in to change notification settings - Fork 48
47 lines (44 loc) · 1.33 KB
/
ci.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
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}}