Skip to content

Commit

Permalink
Separate notes from the rest of helm output
Browse files Browse the repository at this point in the history
  • Loading branch information
theturtle32 committed Nov 15, 2024
1 parent 1caa8dd commit 5fb2134
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions main.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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 {
Expand Down

0 comments on commit 5fb2134

Please sign in to comment.