Skip to content

Commit

Permalink
update resource names
Browse files Browse the repository at this point in the history
  • Loading branch information
abbas-khan10 committed Sep 16, 2024
1 parent cad1897 commit 985eb82
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/base-batch-update.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,25 +66,25 @@ jobs:
- name: Download task definition
id: download-task
run: |
aws ecs describe-task-definition --task-definition ${{ inputs.sandbox }}-service-task-ods-weekly-update --query taskDefinition > task-definition.json
aws ecs describe-task-definition --task-definition ${{ inputs.sandbox }}-ods-weekly-update-cluster-task --query taskDefinition > task-definition.json
echo "revision=$(cat task-definition.json | jq .revision)" >> $GITHUB_OUTPUT
- name: Fill in the new image ID in the Amazon ECS task definition
id: task-def
uses: aws-actions/amazon-ecs-render-task-definition@v1
with:
task-definition: ./lambdas/task-definition.json
container-name: ${{ inputs.sandbox }}-container-ods-weekly-update
container-name: ${{ inputs.sandbox }}-ods-weekly-update-cluster-container
image: ${{ steps.build-image.outputs.image }}

- name: Deploy Amazon ECS task definition
uses: aws-actions/amazon-ecs-deploy-task-definition@v2
with:
task-definition: ./lambdas/task-definition.json
cluster: ${{ inputs.sandbox }}-ods-weekly-update
cluster: ${{ inputs.sandbox }}-ods-weekly-update-cluster
wait-for-service-stability: true

- name: De-register previous revision
run: |
aws ecs deregister-task-definition \
--task-definition ${{ inputs.sandbox }}-service-task-ods-weekly-update:${{ steps.download-task.outputs.revision }}
--task-definition ${{ inputs.sandbox }}-ods-weekly-update-cluster-task:${{ steps.download-task.outputs.revision }}
6 changes: 3 additions & 3 deletions .github/workflows/base-deploy-ui.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,15 +87,15 @@ jobs:
- name: Download task definition
id: download-task
run: |
aws ecs describe-task-definition --task-definition ${{ inputs.sandbox }}-ndr-service-task --query taskDefinition > task-definition.json
aws ecs describe-task-definition --task-definition ${{ inputs.sandbox }}-app-cluster-task --query taskDefinition > task-definition.json
echo "::set-output name=revision::$(cat task-definition.json | jq .revision)"
- name: Fill in the new image ID in the Amazon ECS task definition
id: task-def
uses: aws-actions/amazon-ecs-render-task-definition@v1
with:
task-definition: ./app/task-definition.json
container-name: ${{ inputs.sandbox }}-app-container
container-name: ${{ inputs.sandbox }}-app-cluster-container
image: ${{ steps.build-image.outputs.image }}

- name: Deploy Amazon ECS task definition
Expand All @@ -109,4 +109,4 @@ jobs:
- name: De-register previous revision
run: |
aws ecs deregister-task-definition \
--task-definition ${{ inputs.sandbox }}-ndr-service-task:${{ steps.download-task.outputs.revision }}
--task-definition ${{ inputs.sandbox }}test-app-cluster-task:${{ steps.download-task.outputs.revision }}

0 comments on commit 985eb82

Please sign in to comment.