Skip to content

Commit

Permalink
added step for passing container.image
Browse files Browse the repository at this point in the history
  • Loading branch information
AbduRawoof committed Dec 23, 2024
1 parent 44807ee commit 2eafd4b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .github/workflows/catalog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,9 @@ jobs:
- name: Update ECS task definition with new image
run: |
export NEW_IMAGE_URI=$NEW_IMAGE_URI
aws ecs describe-task-definition --task-definition $TASK_DEFINITION_NAME --query 'taskDefinition | {containerDefinitions: containerDefinitions, family: family, taskRoleArn: taskRoleArn, executionRoleArn: executionRoleArn, networkMode: networkMode, volumes: volumes, placementConstraints: placementConstraints, requiresCompatibilities: requiresCompatibilities, cpu: cpu, memory: memory}' --output json > task-def-template.json
sed -i.bak '/"name": "abdu7511-catalog"/,/}/s|\"image\": \".*\"|\"image\": \"$NEW_IMAGE_URI\"|' task-def-template.json
sed -i.bak "/"name": "abdu7511-catalog"/,/}/s|\"image\": \".*\"|\"image\": \"$NEW_IMAGE_URI\"|" task-def-template.json
NEW_TASK_DEF_ARN=$(aws ecs register-task-definition --cli-input-json file://task-def-template.json --query 'taskDefinition.taskDefinitionArn' --output text)
echo "task_definition_arn=$NEW_TASK_DEF_ARN" >> $GITHUB_ENV
rm task-def-template.json task-def-template.json.bak
Expand Down

0 comments on commit 2eafd4b

Please sign in to comment.