diff --git a/.automation/cleanup-docker.sh b/.automation/cleanup-docker.sh index 15a082b3..04c1d662 100644 --- a/.automation/cleanup-docker.sh +++ b/.automation/cleanup-docker.sh @@ -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 ################################################################################ diff --git a/.automation/upload-docker.sh b/.automation/upload-docker.sh index 6bbdf171..6df046b0 100755 --- a/.automation/upload-docker.sh +++ b/.automation/upload-docker.sh @@ -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 # ############################ diff --git a/.github/workflows/cleanup-DEV.yml b/.github/workflows/cleanup-DEV.yml index 5358be0d..1226b9fd 100644 --- a/.github/workflows/cleanup-DEV.yml +++ b/.github/workflows/cleanup-DEV.yml @@ -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 diff --git a/.github/workflows/deploy-DEV.yml b/.github/workflows/deploy-DEV.yml index e8ce2c47..5aac725d 100644 --- a/.github/workflows/deploy-DEV.yml +++ b/.github/workflows/deploy-DEV.yml @@ -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