From c2408ccd2f7ae76dde81ae72c12fc1422bc41abf Mon Sep 17 00:00:00 2001 From: Thibault Derousseaux Date: Mon, 16 Sep 2024 17:49:47 -0400 Subject: [PATCH] fixup! Deploy to AWS ECS --- .github/workflows/deploy.yml | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 2034c9a..f42be96 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -26,15 +26,14 @@ jobs: - name: Build, tag, and push Docker image to Amazon ECR id: build-tag-and-push-docker-image env: - ECR_REGISTRY: ${{ steps.log-into-ecr.outputs.registry }} - ECR_REPOSITORY: atoti-project-template - IMAGE_TAG: ${{ github.sha }} + TAG: ${{ steps.log-into-ecr.outputs.registry }}/atoti-project-template:${{ github.sha }} run: | - docker build --tag $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG . - docker push $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG - echo "image={$ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG}" >> $GITHUB_OUTPUT + docker build --tag $TAG . + docker push $TAG + echo "image={$TAG}" >> $GITHUB_OUTPUT - name: Inline variables in the task definition run: sed -i -e 's/AWS_ACCOUNT_ID/${{ secrets.AWS_ACCOUNT_ID }}/g' -e 's/AWS_DATABASE_URL_SECRET_NAME/${{ vars.AWS_DATABASE_URL_SECRET_NAME }}/g' -e 's/AWS_EXECUTION_ROLE/${{ vars.AWS_EXECUTION_ROLE }}/g' task-definition.json + - run: cat task-definition.json - uses: aws-actions/amazon-ecs-render-task-definition@v1 id: render-task-definition with: