Merge pull request #131 from github/FixAutomation

fixing automation
This commit is contained in:
Zack Koppert 2020-06-18 11:15:28 -07:00 committed by GitHub
commit bc7d0f81ab
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -61,6 +61,34 @@ ValidateInput()
echo "Successfully found:[GITHUB_WORKSPACE], value:[$GITHUB_WORKSPACE]"
fi
#######################
# Validate IMAGE_REPO #
#######################
if [ -z "$IMAGE_REPO" ]; then
# No repo was pulled
echo "ERROR! Failed to get [IMAGE_REPO]!"
echo "ERROR:[$IMAGE_REPO]"
exit 1
elif [[ "$IMAGE_REPO" == "github/super-linter" ]]; then
# Found our main repo
echo "Successfully found:[IMAGE_REPO], value:[$IMAGE_REPO]"
else
# This is a fork and we cant pull vars or any info
echo "WARN! No image to cleanup as this is a forked branch, and not being built with current automation!"
exit 0
fi
##########################
# Validate IMAGE_VERSION #
##########################
if [ -z "$IMAGE_VERSION" ]; then
echo "ERROR! Failed to get [IMAGE_VERSION]!"
echo "ERROR:[$IMAGE_VERSION]"
exit 1
else
echo "Successfully found:[IMAGE_VERSION], value:[$IMAGE_VERSION]"
fi
############################
# Validate DOCKER_USERNAME #
############################
@ -83,28 +111,6 @@ ValidateInput()
echo "Successfully found:[DOCKER_PASSWORD], value:[********]"
fi
#######################
# Validate IMAGE_REPO #
#######################
if [ -z "$IMAGE_REPO" ]; then
echo "ERROR! Failed to get [IMAGE_REPO]!"
echo "ERROR:[$IMAGE_REPO]"
exit 1
else
echo "Successfully found:[IMAGE_REPO], value:[$IMAGE_REPO]"
fi
##########################
# Validate IMAGE_VERSION #
##########################
if [ -z "$IMAGE_VERSION" ]; then
echo "ERROR! Failed to get [IMAGE_VERSION]!"
echo "ERROR:[$IMAGE_VERSION]"
exit 1
else
echo "Successfully found:[IMAGE_VERSION], value:[$IMAGE_VERSION]"
fi
##################################################
# Check if we need to get the name of the branch #
##################################################