Skip to content

Commit

Permalink
fix: enable forceNewDeployment for ECS Task that is broken per #157 (#…
Browse files Browse the repository at this point in the history
…159)

Co-authored-by: yehuda-elementryx <[email protected]>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
  • Loading branch information
3 people authored Jan 28, 2021
1 parent c74a8ca commit 4b6d445
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -391,8 +391,8 @@ async function run() {
waitForMinutes = MAX_WAIT_MINUTES;
}

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

// Register the task definition
core.debug('Registering the task definition');
Expand Down
4 changes: 2 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -226,8 +226,8 @@ async function run() {
waitForMinutes = MAX_WAIT_MINUTES;
}

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

// Register the task definition
core.debug('Registering the task definition');
Expand Down
2 changes: 1 addition & 1 deletion index.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -741,7 +741,7 @@ describe('Deploy to ECS', () => {
.mockReturnValueOnce('cluster-789') // cluster
.mockReturnValueOnce('false') // wait-for-service-stability
.mockReturnValueOnce('') // wait-for-minutes
.mockReturnValueOnce(true); // force-new-deployment
.mockReturnValueOnce('true'); // force-new-deployment

await run();
expect(core.setFailed).toHaveBeenCalledTimes(0);
Expand Down

0 comments on commit 4b6d445

Please sign in to comment.