Skip to content

Commit 4b6d445

Browse files
fix: enable forceNewDeployment for ECS Task that is broken per #157 (#159)
Co-authored-by: yehuda-elementryx <[email protected]> Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
1 parent c74a8ca commit 4b6d445

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

dist/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -391,8 +391,8 @@ async function run() {
391391
waitForMinutes = MAX_WAIT_MINUTES;
392392
}
393393

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

397397
// Register the task definition
398398
core.debug('Registering the task definition');

index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -226,8 +226,8 @@ async function run() {
226226
waitForMinutes = MAX_WAIT_MINUTES;
227227
}
228228

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

232232
// Register the task definition
233233
core.debug('Registering the task definition');

index.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -741,7 +741,7 @@ describe('Deploy to ECS', () => {
741741
.mockReturnValueOnce('cluster-789') // cluster
742742
.mockReturnValueOnce('false') // wait-for-service-stability
743743
.mockReturnValueOnce('') // wait-for-minutes
744-
.mockReturnValueOnce(true); // force-new-deployment
744+
.mockReturnValueOnce('true'); // force-new-deployment
745745

746746
await run();
747747
expect(core.setFailed).toHaveBeenCalledTimes(0);

0 commit comments

Comments
 (0)