From 4ae636f5186394b25fb8d377409858e3a20fc69f Mon Sep 17 00:00:00 2001 From: martinmbaya Date: Mon, 15 Jul 2024 14:24:23 +0300 Subject: [PATCH] Treat boolean values as boolean & string --- .github/workflows/build-docker-push-to-ecr.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-docker-push-to-ecr.yml b/.github/workflows/build-docker-push-to-ecr.yml index ce688bd..7abb9f0 100644 --- a/.github/workflows/build-docker-push-to-ecr.yml +++ b/.github/workflows/build-docker-push-to-ecr.yml @@ -55,7 +55,7 @@ jobs: id: login-ecr uses: aws-actions/amazon-ecr-login@v1 - name: Build and push container image - if: ${{ (inputs.ENVIRONMENT != 'prod' && inputs.RETAG == 'true') || inputs.RETAG == 'false' }} + if: ${{ (inputs.ENVIRONMENT != 'prod' && (inputs.RETAG == true || inputs.RETAG == 'true')) || (inputs.RETAG == false || inputs.RETAG == 'false') }} working-directory: ${{ inputs.DOCKERFILE_PATH }} run: | docker build -f ${{ inputs.DOCKERFILE_NAME }} \ @@ -63,7 +63,7 @@ jobs: . ${{ secrets.BUILD_ARG }} docker push -a ${{ inputs.REGISTRY_URL }}/${{ inputs.APPLICATION_NAME }} - name: Retag and push container image - if: ${{ inputs.ENVIRONMENT == 'prod' && inputs.RETAG == 'true' }} + if: ${{ inputs.ENVIRONMENT == 'prod' && (inputs.RETAG == true || inputs.RETAG == 'true') }} run: | docker pull ${{ inputs.REGISTRY_URL }}/${{ inputs.APPLICATION_NAME }}:$GITHUB_SHA docker tag ${{ inputs.REGISTRY_URL }}/${{ inputs.APPLICATION_NAME }}:$GITHUB_SHA ${{ inputs.REGISTRY_URL }}/${{ inputs.APPLICATION_NAME }}:${{ github.ref_name }}