Skip to content

Commit 2c9c0ec

Browse files
author
GitHub Actions
committed
chore: Update dist
1 parent 632a7fa commit 2c9c0ec

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed

dist/index.js

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,7 @@ function removeIgnoredAttributes(taskDef) {
294294
return taskDef;
295295
}
296296

297-
function maintainAppMeshConfiguration(taskDef) {
297+
function maintainValidObjects(taskDef) {
298298
if (validateProxyConfigurations(taskDef)) {
299299
taskDef.proxyConfiguration.properties.forEach((property, index, arr) => {
300300
if (!('value' in property)) {
@@ -305,6 +305,18 @@ function maintainAppMeshConfiguration(taskDef) {
305305
}
306306
});
307307
}
308+
309+
if(taskDef && taskDef.containerDefinitions){
310+
taskDef.containerDefinitions.forEach((container) => {
311+
if(container.environment){
312+
container.environment.forEach((property, index, arr) => {
313+
if (!('value' in property)) {
314+
arr[index].value = '';
315+
}
316+
});
317+
}
318+
});
319+
}
308320
return taskDef;
309321
}
310322

@@ -418,7 +430,7 @@ async function run() {
418430
taskDefinitionFile :
419431
path.join(process.env.GITHUB_WORKSPACE, taskDefinitionFile);
420432
const fileContents = fs.readFileSync(taskDefPath, 'utf8');
421-
const taskDefContents = maintainAppMeshConfiguration(removeIgnoredAttributes(cleanNullKeys(yaml.parse(fileContents))));
433+
const taskDefContents = maintainValidObjects(removeIgnoredAttributes(cleanNullKeys(yaml.parse(fileContents))));
422434
let registerResponse;
423435
try {
424436
registerResponse = await ecs.registerTaskDefinition(taskDefContents).promise();

0 commit comments

Comments
 (0)