do it another way

This commit is contained in:
Lucas Gravley 2020-01-09 13:10:40 -06:00
parent bc1d6bd770
commit 0c4cfa88d0
4 changed files with 5 additions and 15 deletions

View file

@ -20,7 +20,7 @@ GITHUB_WORKSPACE="${GITHUB_WORKSPACE}" # Github Workspace
DOCKER_USERNAME="${DOCKER_USERNAME}" # Username to login to DockerHub
DOCKER_PASSWORD="${DOCKER_PASSWORD}" # Password to login to DockerHub
IMAGE_REPO="${IMAGE_REPO}" # Image repo to upload the image
IMAGE_VERSION="${IMAGE_VERSION}" # Version to tag the image
IMAGE_VERSION="${GITHUB_SHA}" # Version to tag the image
DOCKERFILE_PATH="${DOCKERFILE_PATH}" # Path to the Dockerfile to be uploaded
################################################################################

View file

@ -98,17 +98,8 @@ ValidateInput()
# 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 #
##################################################
if [[ "$IMAGE_VERSION" != "latest" ]]; then
echo "WARN! Failed to get [IMAGE_VERSION]!"
echo "Pulling from Branch Name..."
##############################
# Get the name of the branch #
##############################
@ -137,9 +128,10 @@ ValidateInput()
# Set the IMAGE_VERSION to the BRANCH_NAME #
############################################
IMAGE_VERSION="$BRANCH_NAME"
else
echo "Successfully found:[IMAGE_VERSION], value:[$IMAGE_VERSION]"
fi
############################
# Validate DOCKERFILE_PATH #
############################

View file

@ -47,6 +47,5 @@ jobs:
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
IMAGE_REPO: admiralawkbar/super-linter
IMAGE_VERSION: ${{ GITHUB_SHA }}
shell: bash
run: .automation/cleanup-docker.sh

View file

@ -49,7 +49,6 @@ jobs:
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
IMAGE_REPO: admiralawkbar/super-linter
IMAGE_VERSION: ${{ GITHUB_SHA }}
DOCKERFILE_PATH: Dockerfile
shell: bash
run: .automation/upload-docker.sh