Update 'check.sh'
All checks were successful
ci/woodpecker/push/build Pipeline was successful

This commit is contained in:
2023-03-12 11:28:49 +01:00
parent 9dde049945
commit 07925fd895

View File

@@ -28,6 +28,10 @@ fi
echo "${BASE}" | grep -q "/" || BASE="library/${BASE}"
echo "${TARGET}" | grep -q "/" || TARGET="library/${TARGET}"
# if no tag is give default to latest
echo "${BASE}" | grep -q ":" || BASE="${BASE}:latest"
echo "${TARGET}" | grep -q ":" || TARGET="${TARGET}:latest"
# move tha tag to its own var and remove it from the repo name
BASE_TAG=$(echo "${BASE}" | sed 's/[^:]*://')
@@ -36,15 +40,6 @@ TARGET_TAG=$(echo "${TARGET}" | sed 's/[^:]*://')
BASE_REPO=$(echo "${BASE}" | sed 's/:.*//')
TARGET_REPO=$(echo "${TARGET}" | sed 's/:.*//')
# if no tag is give default to latest
if [ -z "${BASE_TAG}" ]; then
BASE_TAG="latest"
fi
if [ -z "${TARGET_TAG}" ]; then
TARGET_TAG="latest"
fi
# build the url to the repo
BASE_URL="https://hub.docker.com/v2/repositories/${BASE_REPO}/tags/${BASE_TAG}"