Comments (2)
I'm having the same issue. Here are the things I've tried to far-
- Went to version 1.1.2, 1.0.9, 1.0.2
- hard coded the ecr image and URI
- Quotes, single quotes
- Manually created task with the image URI I intended to use (did to confirm i was using the right arn)
- provide ecs:* and ecr:* to ensure gitub action role had enough permissions (previous jobs already validated this, but i was getting desperate.)
None of these got this action to work while disproving other issues. I think i'm just going to go with writing my own script here.
Never mind, I'm a silly goose. I had container-name
as the name of the container or repo in ecr not the name of the container in the task definition or more specifically the container definition.
Updating that fixed it and works on 1.1.3 for me.
from amazon-ecs-render-task-definition.
UPDATE as of 21st Spt. 2023
The action is now working without issues.
In case this action is not working for you, here's an alternative:
#!/bin/bash
# Check if the new image parameter is provided
if [ $# -eq 0 ]; then
echo "Usage: $0 <new_image>"
exit 1
fi
# Read the new image from the command line argument
new_image=$1
# Read the JSON file into a variable
json_data=$(cat task-definition.json)
# Use jq to update the "image" field with the new value
updated_json=$(echo "$json_data" | jq --arg new_image "$new_image" '.containerDefinitions[0].image = $new_image')
# Save the updated JSON back to the file
echo "$updated_json" > task-definition.json
Run like:
./aws-ecs-task-def-renderer.sh <YOUR_NEW_IMAGE_TAG_HERE>
from amazon-ecs-render-task-definition.
Related Issues (20)
- Error: Cannot read property 'containerDefinitions' of null
- Error: Invalid task definition format: containerDefinitions section is not present or is not an array HOT 2
- Github is deprecating the use of node12 on all actions. HOT 5
- set-output command is deprecated HOT 6
- Add ability to set env vars from file or from AWS AppConfig
- dynamic image change HOT 2
- The `set-output` command is deprecated HOT 4
- Render for more than one container HOT 3
- Q: Error: Invalid task definition: Could not find container definition with matching name HOT 14
- How to create a new revision for an existing task definition? HOT 2
- Unable to use multi-line environment variables HOT 3
- current status HOT 3
- how to update the awslogs-group? HOT 2
- new dist creation workflow (package) failing
- ephemeralStorage value is not copied over
- Adding support for `dockerLabels` in task HOT 1
- How to pass environment variable file to the action? HOT 2
- dockers-labels not working HOT 4
- Node16 deprecation warning HOT 16
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from amazon-ecs-render-task-definition.