Skip to content

Commit 18604bc

Browse files
committed
fix: update ECR repository URL handling and image tagging in deployment workflow
1 parent 4a403c5 commit 18604bc

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

.github/workflows/deploy-to-ecr.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ jobs:
5151
ECR_FULL_REPO_URL=$(terraform output -raw ecr_repository_url)
5252
ECR_REGISTRY=$(echo "$ECR_FULL_REPO_URL" | cut -d'/' -f1)
5353
echo "ECR_REGISTRY=$ECR_REGISTRY" >> $GITHUB_ENV
54+
echo "ECR_REPOSITORY_URL=$ECR_FULL_REPO_URL" >> $GITHUB_ENV
5455
working-directory: ${{ env.TERRAFORM_DIR }}
5556

5657
- name: Login to Amazon ECR
@@ -69,7 +70,9 @@ jobs:
6970
context: .
7071
file: ./Dockerfile
7172
push: true
72-
tags: ${{ env.ECR_REPOSITORY_URL }}:latest
73+
tags: |
74+
${{ env.ECR_REPOSITORY_URL }}:${{ env.IMAGE_TAG }}
75+
${{ env.ECR_REPOSITORY_URL }}:latest
7376
7477
# Second Apply: Update ECS with new image
7578
- name: Terraform Apply (Update ECS with new image)

0 commit comments

Comments
 (0)