Add check image exists

This commit is contained in:
Shiming Zhang
2022-01-18 16:36:33 +08:00
parent 6310c88ab8
commit 155ec1c1b5
2 changed files with 20 additions and 2 deletions

15
hack/verify-image.sh Executable file
View File

@@ -0,0 +1,15 @@
#!/usr/bin/env bash
patch_url=$1
file=mirror.txt
cp "${file}" "${file}.bak"
git apply -R <(curl -fsSL "${patch_url}")
list=$(diff --unified "${file}" "${file}.bak" | grep -e '^+\w' | sed 's/^+//')
for image in ${list}; do
skopeo inspect --raw "docker://${image}" || { echo "Not Found ${image}" ; exit 1; }
done