@@ -55,7 +55,7 @@ async function runTask(ecs, clusterName, taskDefArn, waitForMinutes, enableECSMa
55
55
if(assignPublicIP != "" && (subnetIds != "" || securityGroupIds != "")){
56
56
awsvpcConfiguration["assignPublicIp"] = assignPublicIP
57
57
}
58
- let volumeConfigurations = null ;
58
+ let volumeConfigurations = [] ;
59
59
let taskManagedEBSVolumeObject;
60
60
61
61
if (runTaskManagedEBSVolumeName != '') {
@@ -203,7 +203,7 @@ async function updateEcsService(ecs, clusterName, service, taskDefArn, waitForSe
203
203
const serviceManagedEBSVolumeName = core.getInput('service-managed-ebs-volume-name', { required: false }) || '';
204
204
const serviceManagedEBSVolume = core.getInput('service-managed-ebs-volume', { required: false }) || '{}';
205
205
206
- let volumeConfigurations = null ;
206
+ let volumeConfigurations = [] ;
207
207
let serviceManagedEbsVolumeObject;
208
208
209
209
if (serviceManagedEBSVolumeName != '') {
@@ -224,17 +224,14 @@ async function updateEcsService(ecs, clusterName, service, taskDefArn, waitForSe
224
224
taskDefinition: taskDefArn,
225
225
forceNewDeployment: forceNewDeployment,
226
226
enableECSManagedTags: enableECSManagedTags,
227
- propagateTags: propagateTags
227
+ propagateTags: propagateTags,
228
+ volumeConfigurations: volumeConfigurations
228
229
};
229
230
230
231
// Add the desiredCount property only if it is defined and a number.
231
232
if (!isNaN(desiredCount) && desiredCount !== undefined) {
232
233
params.desiredCount = desiredCount;
233
234
}
234
- // Add VolumeConfigurations property only it is not null
235
- if(volumeConfigurations !== null){
236
- params.volumeConfigurations = volumeConfigurations;
237
- }
238
235
await ecs.updateService(params);
239
236
240
237
const region = await ecs.config.region();
0 commit comments