Skip to content

Commit

Permalink
fix: test workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
abelr20 committed Aug 22, 2024
1 parent 6f25d73 commit cb79400
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion .github/workflows/aws.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,19 @@ jobs:
docker buildx build --platform linux/amd64 --push -t $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG .
echo "image=$ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG" >> $GITHUB_OUTPUT
- name: Fetch Latest Task Definition ARN
id: fetch-task-def-arn
run: |
# Fetch the latest task definition for the service
TASK_DEFINITION_ARN=$(aws ecs describe-services \
--cluster ${{ env.ECS_CLUSTER }} \
--services ${{ env.ECS_SERVICE }} \
--query 'services[0].taskDefinition' \
--output text)
echo "TASK_DEFINITION_ARN=$TASK_DEFINITION_ARN" >> $GITHUB_ENV
- name: Deploy to AWS ECS
run: |
aws ecs update-service --cluster ${{ env.ECS_CLUSTER }} --service ${{ env.ECS_SERVICE }} --force-new-deployment
# Use the latest task definition revision for the deployment
aws ecs update-service --cluster ${{ env.ECS_CLUSTER }} --service ${{ env.ECS_SERVICE }} --task-definition ${{ env.TASK_DEFINITION_ARN }} --force-new-deployment

0 comments on commit cb79400

Please sign in to comment.