Skip to content

Commit

Permalink
Add Download task definition
Browse files Browse the repository at this point in the history
  • Loading branch information
wspooong authored Mar 21, 2024
1 parent 99d3cb4 commit 0d050bb
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions .github/workflows/aws.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ on:

env:
ECR_REPOSITORY: ${{ secrets.ECR_REPOSITORY }}
ECS_TASK_DEFINITION: .github/workflows/task_defination.json # set this to the path to your Amazon ECS task definition

permissions:
contents: read
Expand All @@ -58,6 +57,10 @@ jobs:
id: login-ecr
uses: aws-actions/amazon-ecr-login@v1

- name: Download task definition
run: |
aws ecs describe-task-definition --task-definition my-task-definition-family --query taskDefinition > task-definition.json
- name: Build, tag, and push image to Amazon ECR
id: build-image
env:
Expand All @@ -75,7 +78,7 @@ jobs:
id: task-def
uses: aws-actions/amazon-ecs-render-task-definition@v1
with:
task-definition: ${{ env.ECS_TASK_DEFINITION }}
task-definition: task-definition.json
container-name: ${{ secrets.CONTAINER_NAME }}
image: ${{ steps.build-image.outputs.image }}

Expand Down

0 comments on commit 0d050bb

Please sign in to comment.