File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -132,7 +132,7 @@ async function run() {
132132
133133 // Register the task definition if necessary - or use the passed in ARN
134134 if (!taskDefinitionFile && !taskDefRevisionArn) {
135- const msg = "Invalid parameters: One of task-definition-file or task-definition-arn must be set";
135+ const msg = "Invalid parameters: One of task-definition or task-definition-revision -arn must be set";
136136 core.setFailed(msg);
137137 throw new Error(msg);
138138 }
@@ -163,8 +163,17 @@ async function run() {
163163 } else {
164164 core.debug(`Using the passed task definition ARN ${taskDefRevisionArn}`);
165165 }
166+
166167 core.setOutput('task-definition-arn', taskDefRevisionArn);
167168
169+ /* Extract task-definition-family & revision ARN, so we can output family:revision
170+ * Useful for later using `aws ecs describe-task-definition` to get the full ARN,
171+ * since outputting full ARN can be misinterpreted as a secret by Github Actions.
172+ */
173+ const regex = new RegExp(':task-definition/(.*)$');
174+ const matches = taskDefRevisionArn.match(regex);
175+ core.setOutput('task-definition-family-and-revision', matches[1])
176+
168177 const clusterName = cluster ? cluster : 'default';
169178
170179 /**
You can’t perform that action at this time.
0 commit comments