Closed sgript closed 4 months ago
Hi @sgript
take a look at your describe-task-definition
run command step again. you need to make sure its a valid task definition as the raw aws-cli will output the task def with the key taskDefinition
so you can either do:
- run: aws ecs describe-task-definition --task-definition ${{ env.ECS_TASK_DEFINITION }} --query taskDefinition > ecs/node/task_definition.json
or
- run: aws ecs describe-task-definition --task-definition ${{ env.ECS_TASK_DEFINITION }} | jq '.taskDefinition' > ecs/node/task_definition.json
hope that helps. -andy
Hi, closing this issue as it seems to have been answered. Please feel free to re-open or open a new issue if there are additional concerns. Thanks!
Hey there,
I've been trying to get this GitHub action to work but have been running into issues. I've been programmatically been trying to retrieve the task definition using this command:
aws ecs describe-task-definition --task-definition ${{ env.ECS_TASK_DEFINITION }} > ecs/node/task_definition.json
Then using it for this action. But for some reason, it just isn't liking the containerDefinitions, which are returned in the JSON. I've verified the command does return correctly.
Here is our GitHub actions yaml:
I was hoping someone could direct me on what may be wrong here, or if I'm doing this incorrectly. I would ideally like to stick to dynamically generating the task definition using the AWS CLI, as it is our separate Terraform repo that spins up the ECS infrastructure, hence why I opted for AWS CLI to grab the task definition in order to use this action.