diff --git a/dist/index.js b/dist/index.js index 1192f3807..6ffd36d5c 100644 --- a/dist/index.js +++ b/dist/index.js @@ -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'); diff --git a/index.js b/index.js index fa87eb061..dcf84c7a1 100644 --- a/index.js +++ b/index.js @@ -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'); diff --git a/index.test.js b/index.test.js index 4a7d768cb..7ec0691aa 100644 --- a/index.test.js +++ b/index.test.js @@ -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);