Skip to content

Commit

Permalink
fix: forceNewDeployment to be a boolean
Browse files Browse the repository at this point in the history
  • Loading branch information
Parag Bhingre committed Nov 11, 2020
1 parent a8cee1a commit de201af
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
4 changes: 3 additions & 1 deletion dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -355,8 +355,10 @@ async function run() {
if (waitForMinutes > MAX_WAIT_MINUTES) {
waitForMinutes = MAX_WAIT_MINUTES;
}
const forceNewDeployment = core.getInput('force-new-deployment', { required: false }) || false;

const forceNewDeployInput = core.getInput('force-new-deployment', { required: false })
const forceNewDeployment = forceNewDeployInput != undefined && forceNewDeployInput.toLocaleLowerCase === "true" ? true : false;

// Register the task definition
core.debug('Registering the task definition');
const taskDefPath = path.isAbsolute(taskDefinitionFile) ?
Expand Down
4 changes: 3 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -222,8 +222,10 @@ async function run() {
if (waitForMinutes > MAX_WAIT_MINUTES) {
waitForMinutes = MAX_WAIT_MINUTES;
}
const forceNewDeployment = core.getInput('force-new-deployment', { required: false }) || false;

const forceNewDeployInput = core.getInput('force-new-deployment', { required: false })
const forceNewDeployment = forceNewDeployInput != undefined && forceNewDeployInput.toLocaleLowerCase === "true" ? true : false;

// Register the task definition
core.debug('Registering the task definition');
const taskDefPath = path.isAbsolute(taskDefinitionFile) ?
Expand Down
2 changes: 1 addition & 1 deletion index.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -755,7 +755,7 @@ describe('Deploy to ECS', () => {
cluster: 'cluster-789',
service: 'service-456',
taskDefinition: 'task:def:arn',
forceNewDeployment: true
forceNewDeployment: false
});
});

Expand Down

0 comments on commit de201af

Please sign in to comment.