Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support ARN being passed in as well as a file #658

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

LukeSheard
Copy link

@LukeSheard LukeSheard commented Oct 8, 2024

An up to date version of this PR which should support the AWS SDK v3.

let taskDefArn = null;

// Of taskDefContent starts with arn: then we assume it is a task definition ARN
if (taskDefinitionContent.startsWith("arn:")) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for this PR!

I am wondering if it would be a good idea to introduce another variable for taskDefinitionArn instead of re-using existing variable? This could ease error handling by helping us return proper error messages back to users.

We have something similar implemented in the amazon-ecs-render-task-definition repo as well:
https://github.com/aws-actions/amazon-ecs-render-task-definition/blob/master/dist/index.js#L32

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay, I will implement it in the equivalent way to the render task definition action.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants