From 1196333d3625a373cf698b64c65360b915254146 Mon Sep 17 00:00:00 2001 From: Sam Seed Date: Mon, 9 Oct 2023 16:14:06 +0100 Subject: [PATCH] Start trying to work out how to check if image already exists --- .github/workflows/aws_deploy.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/workflows/aws_deploy.yml b/.github/workflows/aws_deploy.yml index e7e473841..f8005d9e8 100644 --- a/.github/workflows/aws_deploy.yml +++ b/.github/workflows/aws_deploy.yml @@ -49,6 +49,14 @@ jobs: with: mask-password: 'true' + - name: Check if image with tag already exists (hide errors?) + run: | + aws ecr describe-images --repository-name=$repository --image-ids=imageTag=${{ github.sha }} 2> /dev/null + + - name: Check if image with tag already exists + run: | + aws ecr describe-images --repository-name=$repository --image-ids=imageTag=${{ github.sha }} + - name: Build, tag, and push docker image to ECR id: build-image env: