diff --git a/.github/workflows/cicd.yml b/.github/workflows/cicd.yml index 0f58ce9..191bd5f 100644 --- a/.github/workflows/cicd.yml +++ b/.github/workflows/cicd.yml @@ -110,10 +110,10 @@ jobs: - name: Build, tag, and push image to Amazon ECR run: | - ECR_REGISTRY=${{ steps.login-ecr.outputs.registry }} ECR_REPOSITORY=test IMAGE_TAG=latest - IMAGE_URI="$ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG" - docker build -t $IMAGE_URI . + IMAGE_NAME=app + IMAGE_URI="${ECR_REGISTRY}/${ECR_REPOSITORY}:${IMAGE_TAG}" + docker build -t $IMAGE_NAME . + docker tag $IMAGE_NAME:$IMAGE_TAG $IMAGE_URI docker push $IMAGE_URI -