From 5fb2134ecbbc7e9fd7a744f519795db4b206ef5b Mon Sep 17 00:00:00 2001 From: Brian McKelvey Date: Thu, 14 Nov 2024 23:07:06 -0800 Subject: [PATCH] Separate notes from the rest of helm output --- main.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/main.js b/main.js index 1d33488..f6035d0 100644 --- a/main.js +++ b/main.js @@ -96,7 +96,7 @@ async function main() { try { console.log("\033[36mExecuting helm\033[0m"); - result = await new Promise((resolve, reject) => { + const result = await new Promise((resolve, reject) => { const process = execFile(execShFile.name); process.stdout.on('data', console.log); process.stderr.on('data', console.log); @@ -111,10 +111,16 @@ async function main() { } }); }); + const [output, notes] = result.split(/^NOTES:$/m); fs.appendFileSync( process.env.GITHUB_OUTPUT, - `helm_output<<${multiLineDelimiter}\n${result.trim()}\n${multiLineDelimiter}\n` + `helm_output<<${multiLineDelimiter}\n${output}\n${multiLineDelimiter}\n` ); + fs.appendFileSync( + process.env.GITHUB_OUTPUT, + `helm_notes<<${multiLineDelimiter}\n${notes}\n${multiLineDelimiter}\n` + ); + } catch (error) { process.exit(1); } finally {