Skip to content

Commit

Permalink
fixup! Deploy to AWS ECS
Browse files Browse the repository at this point in the history
  • Loading branch information
tibdex committed Sep 16, 2024
1 parent d708d60 commit 42d3a85
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
- uses: ./.github/actions/setup
- uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: arn:aws:iam::${{ secrets.AWS_ACCOUNT_ID }}:role/${{ vars.AWS_ROLE_NAME }}
role-to-assume: arn:aws:iam::${{ secrets.AWS_ACCOUNT_ID }}:role/${{ vars.AWS_DEPLOYMENT_NAME }}
aws-region: ${{ vars.AWS_REGION }}
- uses: aws-actions/amazon-ecr-login@v2
id: log-into-ecr
Expand All @@ -35,7 +35,7 @@ jobs:
docker push $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG
echo "image={$ECR_REGISTRY/$ECR_REPOSITORY:$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_ROLE_NAME/${{ vars.AWS_ROLE_NAME }}/g' task-definition.json
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
- uses: aws-actions/amazon-ecs-render-task-definition@v1
id: render-task-definition
with:
Expand Down
2 changes: 1 addition & 1 deletion task-definition.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"executionRoleArn": "AWS_ROLE_NAME",
"executionRoleArn": "AWS_EXECUTION_ROLE",
"containerDefinitions": [
{
"name": "atoti-session",
Expand Down

0 comments on commit 42d3a85

Please sign in to comment.