more work
This commit is contained in:
+9
-5
@@ -9,20 +9,24 @@ find . -type f -name "values.yaml" | while read -r file; do
|
|||||||
repo=$(echo "$line" | cut -d ' ' -f2 | sed 's|docker.io/||')
|
repo=$(echo "$line" | cut -d ' ' -f2 | sed 's|docker.io/||')
|
||||||
echo "Checking repo $repo for file $file"
|
echo "Checking repo $repo for file $file"
|
||||||
# Check if equivalent ghcr.io, public.ecr.aws, or gcr.io repositories exist
|
# Check if equivalent ghcr.io, public.ecr.aws, or gcr.io repositories exist
|
||||||
ghcr_url="https://ghcr.io/v2/$repo/tags/list"
|
## TODO add checks and such
|
||||||
|
#ghcr_url="https://ghcr.io/v2/$repo/tags/list"
|
||||||
quay_url="https://quay.io/v2/$repo/tags/list"
|
quay_url="https://quay.io/v2/$repo/tags/list"
|
||||||
ecr_url="https://public.ecr.aws/v2/$repo/tags/list"
|
ecr_url="https://public.ecr.aws/v2/$repo/tags/list"
|
||||||
# Not sure if we should
|
# Not sure if we should
|
||||||
# gcr_url="https://mirror.gcr.io/v2/$repo/tags/list"
|
# gcr_url="https://mirror.gcr.io/v2/$repo/tags/list"
|
||||||
|
|
||||||
ghcr_exists=$(curl -s -o /dev/null -w "%{http_code}" "$ghcr_url")
|
|
||||||
|
## TODO add checks and such
|
||||||
|
# ghcr_exists=$(curl -s -o /dev/null -w "%{http_code}" "$ghcr_url")
|
||||||
quay_exists=$(curl -s -o /dev/null -w "%{http_code}" "$quay_url")
|
quay_exists=$(curl -s -o /dev/null -w "%{http_code}" "$quay_url")
|
||||||
ecr_exists=$(curl -s -o /dev/null -w "%{http_code}" "$ecr_url")
|
ecr_exists=$(curl -s -o /dev/null -w "%{http_code}" "$ecr_url")
|
||||||
# gcr_exists=$(curl -s -o /dev/null -w "%{http_code}" "$gcr_url")
|
# gcr_exists=$(curl -s -o /dev/null -w "%{http_code}" "$gcr_url")
|
||||||
|
|
||||||
if [[ "$ghcr_exists" == "200" ]]; then
|
## TODO add checks and such
|
||||||
new_repo="ghcr.io/$repo"
|
# if [[ "$ghcr_exists" == "200" ]]; then
|
||||||
elif [[ "$quay_exists" == "200" ]]; then
|
# new_repo="ghcr.io/$repo"
|
||||||
|
if [[ "$quay_exists" == "200" ]]; then
|
||||||
new_repo="quay.io/$repo"
|
new_repo="quay.io/$repo"
|
||||||
elif [[ "$ecr_exists" == "200" ]]; then
|
elif [[ "$ecr_exists" == "200" ]]; then
|
||||||
new_repo="public.ecr.aws/$repo"
|
new_repo="public.ecr.aws/$repo"
|
||||||
|
|||||||
Reference in New Issue
Block a user