From 8d1f1c8427313a3c384448aa833c2d416ca88e04 Mon Sep 17 00:00:00 2001 From: Lucas Gravley <29484535+admiralAwkbar@users.noreply.github.com> Date: Thu, 9 Jan 2020 14:06:13 -0600 Subject: [PATCH] fixed? --- .automation/cleanup-docker.sh | 21 +-------------------- .github/workflows/cleanup-DEV.yml | 3 +-- 2 files changed, 2 insertions(+), 22 deletions(-) diff --git a/.automation/cleanup-docker.sh b/.automation/cleanup-docker.sh index 594b8230..063af71f 100755 --- 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="${GITHUB_SHA}" # Version to tag the image +IMAGE_VERSION="${IMAGE_VERSION}" # Version to tag the image DOCKERFILE_PATH="${DOCKERFILE_PATH}" # Path to the Dockerfile to be uploaded ################################################################################ @@ -109,25 +109,6 @@ ValidateInput() # Check if we need to get the name of the branch # ################################################## if [[ "$IMAGE_VERSION" != "latest" ]]; then - ############################## - # Get the name of the branch # - ############################## - BRANCH_NAME=$(git branch --contains "$GITHUB_SHA" |awk '{print $2}' 2>&1) - - ####################### - # Load the error code # - ####################### - ERROR_CODE=$? - - ############################## - # Check the shell for errors # - ############################## - if [ $ERROR_CODE -ne 0 ]; then - echo "ERROR! Failed to get branch name!" - echo "ERROR:[$BRANCH_NAME]" - exit 1 - fi - ################################### # Remove non alpha-numberic chars # ################################### diff --git a/.github/workflows/cleanup-DEV.yml b/.github/workflows/cleanup-DEV.yml index 37311e3d..59fc972d 100644 --- a/.github/workflows/cleanup-DEV.yml +++ b/.github/workflows/cleanup-DEV.yml @@ -36,8 +36,6 @@ jobs: ########################## - name: Checkout Code uses: actions/checkout@v2 - with: - ref: ${{ github.event.pull_request.head.sha }} ###################### # Run Removal script # @@ -48,5 +46,6 @@ jobs: DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }} DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} IMAGE_REPO: admiralawkbar/super-linter + IMAGE_VERSION: ${{ github.event.pull_request.head.ref }} shell: bash run: .automation/cleanup-docker.sh