Skip to content

Commit 7bf2f49

Browse files
author
GitHub Actions
committed
chore: Update dist
1 parent 8141581 commit 7bf2f49

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

dist/index.js

+10-1
Original file line numberDiff line numberDiff 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
/**

0 commit comments

Comments
 (0)