Skip to content

Commit 2fd8c6d

Browse files
author
GitHub Actions
committed
chore: Update dist
1 parent f2d330f commit 2fd8c6d

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

dist/index.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -151,12 +151,13 @@ const IGNORED_TASK_DEFINITION_ATTRIBUTES = [
151151
];
152152

153153
// Deploy to a service that uses the 'ECS' deployment controller
154-
async function updateEcsService(ecs, clusterName, service, taskDefArn, waitForService, waitForMinutes) {
154+
async function updateEcsService(ecs, clusterName, service, taskDefArn, waitForService, waitForMinutes, forceNewDeployment) {
155155
core.debug('Updating the service');
156156
await ecs.updateService({
157157
cluster: clusterName,
158158
service: service,
159-
taskDefinition: taskDefArn
159+
taskDefinition: taskDefArn,
160+
forceNewDeployment: forceNewDeployment
160161
}).promise();
161162
core.info(`Deployment started. Watch this deployment's progress in the Amazon ECS console: https://console.aws.amazon.com/ecs/home?region=${aws.config.region}#/clusters/${clusterName}/services/${service}/events`);
162163

@@ -354,6 +355,7 @@ async function run() {
354355
if (waitForMinutes > MAX_WAIT_MINUTES) {
355356
waitForMinutes = MAX_WAIT_MINUTES;
356357
}
358+
const forceNewDeployment = core.getInput('force-new-deployment', { required: false }) || false;
357359

358360
// Register the task definition
359361
core.debug('Registering the task definition');
@@ -396,7 +398,7 @@ async function run() {
396398

397399
if (!serviceResponse.deploymentController) {
398400
// Service uses the 'ECS' deployment controller, so we can call UpdateService
399-
await updateEcsService(ecs, clusterName, service, taskDefArn, waitForService, waitForMinutes);
401+
await updateEcsService(ecs, clusterName, service, taskDefArn, waitForService, waitForMinutes, forceNewDeployment);
400402
} else if (serviceResponse.deploymentController.type == 'CODE_DEPLOY') {
401403
// Service uses CodeDeploy, so we should start a CodeDeploy deployment
402404
await createCodeDeployDeployment(codedeploy, clusterName, service, taskDefArn, waitForService, waitForMinutes);

0 commit comments

Comments
 (0)