From 5c2e8240c81f20de38d2d3e42f8c052230671c6d Mon Sep 17 00:00:00 2001 From: Sam Seed Date: Mon, 9 Oct 2023 17:03:39 +0100 Subject: [PATCH] Try different way of checking image-exists env var --- .github/workflows/aws_deploy.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/aws_deploy.yml b/.github/workflows/aws_deploy.yml index 0ca309c5e..17da07269 100644 --- a/.github/workflows/aws_deploy.yml +++ b/.github/workflows/aws_deploy.yml @@ -50,13 +50,12 @@ jobs: mask-password: 'true' - name: Check if image with tag already exists - id: check-image-exists run: | echo "image-exists=$(if aws ecr list-images --no-paginate --repository-name=$repository --query "imageIds[*].imageTag" | grep -q ${{ github.sha }}; then echo true; else echo false; fi)" >> $GITHUB_ENV - name: Build, tag, and push docker image to ECR id: build-image - if: ${{ ! env.image-exists }} + if: env.image-exists == false env: registry: ${{ steps.ecr-login.outputs.registry }} commit_tag: ${{ github.sha }}