Skip to content

Commit

Permalink
refactor: Update workflow.yaml to use actions-awscli-v2 for deploying…
Browse files Browse the repository at this point in the history
… to ECS Backend Catalog Microservice
  • Loading branch information
maxsonferovante committed Jul 1, 2024
1 parent 8ae8054 commit 075da20
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions .github/workflows/workflowTestingAndDeploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
run: |
poetry run pytest
- name: Configure AWS credentials to login to ECR
- name: Configure AWS credentials to login to ECR
uses: aws-actions/configure-aws-credentials@v4
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
Expand All @@ -57,13 +57,10 @@ jobs:
docker buildx build --platform linux/amd64 -t ${{ secrets.AWS_ACCOUNT_ID }}.dkr.ecr.$AWS_DEFAULT_REGION.amazonaws.com/$ECR_BACKEND_IMAGE:latest --push .
- name: Deploy to ECS Backend Catalog Microservice
uses: aws-actions/amazon-ecs-deploy-task-definition@v1
uses: imehedi/actions-awscli-v2@latest
with:
task-definition: ${{ secrets.ECS_BACKEND_TASK_DEFINITION }}
service: ${{ secrets.ECS_BACKEND_SERVICE }}
cluster: ${{ secrets.ECS_CLUSTER }}
wait-for-service-stability: true
args: ecs update-service --cluster ${{ secrets.ECS_CLUSTER }} --service ${{ secrets.ECS_BACKEND_SERVICE }} --force-new-deployment
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_DEFAULT_REGION: ${{ secrets.AWS_DEFAULT_REGION }}
AWS_DEFAULT_REGION: ${{ secrets.AWS_DEFAULT_REGION }}

0 comments on commit 075da20

Please sign in to comment.