Skip to content

Commit

Permalink
Fix task and execution role ARN assignment in index.js
Browse files Browse the repository at this point in the history
  • Loading branch information
DMEvanCT committed Apr 24, 2024
1 parent bcab98a commit 4051026
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,7 @@ async function run() {
throw new Error('Invalid task definition: Could not find container definition with matching name');
}
containerDef.image = imageURI;
containerDef.executionRoleArn = taskRoleArn;
containerDef.taskRoleArn = executionRoleArn;


if (command) {
containerDef.command = command.split(' ')
Expand Down Expand Up @@ -126,6 +125,14 @@ async function run() {
})
}

if (taskRoleArn) {
taskDefContents.taskRoleArn = taskRoleArn;
}

if (executionRoleArn) {
taskDefContents.executionRoleArn = executionRoleArn;
}

// Write out a new task definition file
var updatedTaskDefFile = tmp.fileSync({
tmpdir: process.env.RUNNER_TEMP,
Expand Down

0 comments on commit 4051026

Please sign in to comment.