Skip to content

Commit 56e23cc

Browse files
committed
rm update task def
1 parent 8564077 commit 56e23cc

File tree

1 file changed

+0
-38
lines changed

1 file changed

+0
-38
lines changed

.github/workflows/jawn-deployment.yml

Lines changed: 0 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -134,25 +134,6 @@ jobs:
134134
aws-secret-access-key: ${{ secrets.AWS_GITHUB_ACTIONS_SECRET_KEY }}
135135
aws-region: ${{ env.US_REGION }}
136136

137-
- name: Update US Task Definition
138-
id: task-def-us
139-
run: |
140-
# Get the current task definition
141-
aws ecs describe-task-definition \
142-
--task-definition valhalla_jawn_production \
143-
--query 'taskDefinition' > task-definition.json
144-
145-
# Update the image in the container definition
146-
jq --arg IMAGE "${{ env.AWS_ACCOUNT_ID }}.dkr.ecr.${{ env.US_REGION }}.amazonaws.com/${{ env.ECR_REPOSITORY }}:us-${{ needs.build_and_push.outputs.image_tag }}" \
147-
'.containerDefinitions[0].image = $IMAGE' task-definition.json > updated-task-definition.json
148-
149-
# Register the new task definition
150-
NEW_TASK_DEF=$(aws ecs register-task-definition \
151-
--cli-input-json file://updated-task-definition.json \
152-
--query 'taskDefinition.taskDefinitionArn' --output text)
153-
154-
echo "task_def_arn=${NEW_TASK_DEF}" >> $GITHUB_OUTPUT
155-
156137
- name: Deploy to US ECS
157138
run: |
158139
aws deploy create-deployment \
@@ -183,25 +164,6 @@ jobs:
183164
aws-secret-access-key: ${{ secrets.AWS_GITHUB_ACTIONS_SECRET_KEY }}
184165
aws-region: ${{ env.EU_REGION }}
185166

186-
- name: Update EU Task Definition
187-
id: task-def-eu
188-
run: |
189-
# Get the current task definition
190-
aws ecs describe-task-definition \
191-
--task-definition eu_valhalla_jawn_production \
192-
--query 'taskDefinition' > task-definition.json
193-
194-
# Update the image in the container definition
195-
jq --arg IMAGE "${{ env.AWS_ACCOUNT_ID }}.dkr.ecr.${{ env.US_REGION }}.amazonaws.com/${{ env.ECR_REPOSITORY }}:eu-${{ needs.build_and_push.outputs.image_tag }}" \
196-
'.containerDefinitions[0].image = $IMAGE' task-definition.json > updated-task-definition.json
197-
198-
# Register the new task definition
199-
NEW_TASK_DEF=$(aws ecs register-task-definition \
200-
--cli-input-json file://updated-task-definition.json \
201-
--query 'taskDefinition.taskDefinitionArn' --output text)
202-
203-
echo "task_def_arn=${NEW_TASK_DEF}" >> $GITHUB_OUTPUT
204-
205167
- name: Deploy to EU ECS
206168
run: |
207169
aws deploy create-deployment \

0 commit comments

Comments
 (0)