Skip to content

Commit

Permalink
feat(infra): update check ecr image
Browse files Browse the repository at this point in the history
  • Loading branch information
larisa17 committed Jul 29, 2024
1 parent 83b20b6 commit 32493f1
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions .github/workflows/deploy_generic.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,15 +64,11 @@ jobs:
ECR_REPO_NAME=passport
IMAGE_URI=${ACCOUNT_ID}.dkr.ecr.${REGION}.amazonaws.com/${ECR_REPO_NAME}:${IMAGE_TAG}
if aws ecr describe-images --repository-name ${ECR_REPO_NAME} --image-ids imageTag=${IMAGE_TAG} > /dev/null 2>&1; then
echo "Image exists: ${IMAGE_URI}"
echo "::set-output name=image_exists::true"
else
echo "Image does not exist: ${IMAGE_URI}"
echo "::set-output name=image_exists::false"
aws ecr describe-images --repository-name ${ECR_REPO_NAME} --image-ids imageTag=${IMAGE_TAG}
if [ $? -ne 0 ]; then
echo "Image not found in ECR"
exit 1
fi
deploy_preview:
name: Preview - Deploying AWS Infra
needs: [verify_image_ecr]
Expand Down

0 comments on commit 32493f1

Please sign in to comment.