Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,14 @@ When this input is set to `"true"` it will swap out the `.kube/config` with the
* *Required*: `no`
* *Type*: `string`

## Output

This action has only one output and that's the `number` output. This is the number you see in the HTML URL of the
milestone and can be used to refer to in other actions when creating PR's as shown in the example below.
## Outputs

* `helm_output`
* The output of the helm command. Includes everything before the `NOTES:` line in the output of the `helm` command from both `STDOUT` and `STDERR`.
* `helm_notes`
* The rendered output of the NOTES.txt template from the helm chart. Includes everything after the `NOTES:` line in the output of the `helm` command from both `STDOUT` and `STDERR`.
* `number`
* This is the number you see in the HTML URL of the milestone, and can be used to refer to in other actions when creating PR's as shown in the example below.

## Examples

Expand Down
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