Skip to content

Commit

Permalink
fix: dont create new def revision
Browse files Browse the repository at this point in the history
  • Loading branch information
abelr20 committed Aug 22, 2024
1 parent b1efadf commit 338960b
Showing 1 changed file with 0 additions and 16 deletions.
16 changes: 0 additions & 16 deletions .github/workflows/aws.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ env:
ECR_REPOSITORY: app # Set this to your Amazon ECR repository name
ECS_SERVICE: SkyDevOps # Set this to your Amazon ECS service name
ECS_CLUSTER: Sky # Set this to your Amazon ECS cluster name
ECS_TASK_DEFINITION: ecs-task-def.json # Path to your task definition file in the repository

permissions:
contents: read
Expand Down Expand Up @@ -56,20 +55,6 @@ 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: Register ECS Task definition
id: register-task-def
run: |
# Enable error handling
set -e
set -o pipefail
# Register the task definition with ECS and capture the revision number
TASK_DEFINITION_ARN=$(aws ecs register-task-definition \
--cli-input-json file://$ECS_TASK_DEFINITION \
--query 'taskDefinition.taskDefinitionArn' --output text)
echo "TASK_DEFINITION_ARN=$TASK_DEFINITION_ARN" >> $GITHUB_ENV
- name: Deploy to AWS ECS
run: |
# Enable error handling
Expand All @@ -80,7 +65,6 @@ jobs:
UPDATE_OUTPUT=$(aws ecs update-service \
--cluster ${{ env.ECS_CLUSTER }} \
--service ${{ env.ECS_SERVICE }} \
--task-definition ${{ env.TASK_DEFINITION_ARN }} \
--force-new-deployment)
# Wait until the service has stabilized
Expand Down

0 comments on commit 338960b

Please sign in to comment.