diff --git a/dist/index.js b/dist/index.js index 8e9b977..65812a5 100644 --- a/dist/index.js +++ b/dist/index.js @@ -7002,16 +7002,25 @@ const main = async () => { const helm = await helm_1.Helm.create(); const namespace = (0, core_1.getInput)('namespace', { required: true }); const releaseName = (0, core_1.getInput)('releaseName', { required: true }); - const wait = (0, core_1.getInput)('wait', { required: false }) ?? true; + const wait = (0, core_1.getInput)('wait', { required: false }); const defaultRepo = { name: 'gamote', url: 'https://gamote.github.io/charts', chart: 'deployer', }; - const repoUrl = (0, core_1.getInput)('repoUrl', { required: false }) ?? defaultRepo.url; - const repoName = (0, core_1.getInput)('repoName', { required: false }) ?? defaultRepo.name; - const chart = (0, core_1.getInput)('chart', { required: false }) ?? - `${defaultRepo.name}/${defaultRepo.chart}`; + let repoUrl = (0, core_1.getInput)('repoUrl', { required: false }); + if (!repoUrl) { + repoUrl = defaultRepo.url; + } + let repoName = (0, core_1.getInput)('repoName', { required: false }); + if (!repoName) { + repoName = defaultRepo.name; + } + let chart = (0, core_1.getInput)('chart', { required: false }); + if (!chart) { + chart = `${defaultRepo.name}/${defaultRepo.chart}`; + } + console.log(`REPO (${repoName}): ${repoUrl}`); await helm.addRepo(repoName, repoUrl); const helmArgs = [ // 'template', @@ -7022,7 +7031,7 @@ const main = async () => { releaseName, chart, ]; - if (wait) { + if (wait != 'false') { helmArgs.push('--wait'); } getValueFiles().forEach((file) => { diff --git a/src/main.ts b/src/main.ts index 7c63996..5369f4e 100644 --- a/src/main.ts +++ b/src/main.ts @@ -68,7 +68,7 @@ const main = async (): Promise => { const namespace = getInput('namespace', { required: true }); const releaseName = getInput('releaseName', { required: true }); - const wait = getInput('wait', { required: false }) ?? true; + const wait = getInput('wait', { required: false }); const defaultRepo = { name: 'gamote', @@ -76,13 +76,20 @@ const main = async (): Promise => { chart: 'deployer', }; - const repoUrl = getInput('repoUrl', { required: false }) ?? defaultRepo.url; - const repoName = - getInput('repoName', { required: false }) ?? defaultRepo.name; + let repoUrl = getInput('repoUrl', { required: false }); + if (!repoUrl) { + repoUrl = defaultRepo.url; + } + + let repoName = getInput('repoName', { required: false }); + if (!repoName) { + repoName = defaultRepo.name; + } - const chart = - getInput('chart', { required: false }) ?? - `${defaultRepo.name}/${defaultRepo.chart}`; + let chart = getInput('chart', { required: false }); + if (!chart) { + chart = `${defaultRepo.name}/${defaultRepo.chart}`; + } await helm.addRepo(repoName, repoUrl); @@ -96,7 +103,7 @@ const main = async (): Promise => { chart, ]; - if (wait) { + if (wait != 'false') { helmArgs.push('--wait'); }