mirror of
https://github.com/n8n-io/n8n.git
synced 2025-03-05 20:50:17 -08:00
Add result to github output
This commit is contained in:
parent
8c0670749d
commit
84c4b1b3a5
|
@ -1,5 +1,6 @@
|
|||
/* eslint-disable @typescript-eslint/no-loop-func */
|
||||
import fs from 'fs';
|
||||
import os from 'os';
|
||||
import { flags } from '@oclif/command';
|
||||
import type { ITaskData } from 'n8n-workflow';
|
||||
import { sleep } from 'n8n-workflow';
|
||||
|
@ -497,12 +498,19 @@ export class ExecuteBatch extends BaseCommand {
|
|||
result.slackMessage = `*${result.summary.errors.length} Executions errors*`;
|
||||
console.log(result.slackMessage);
|
||||
}
|
||||
this.setOutput('slackMessage', JSON.stringify(result.slackMessage));
|
||||
}
|
||||
console.log(result);
|
||||
res(result);
|
||||
});
|
||||
}
|
||||
|
||||
setOutput(key: string, value: any) {
|
||||
// Temporary hack until we move to the new action.
|
||||
const output = process.env.GITHUB_OUTPUT;
|
||||
// eslint-disable-next-line @typescript-eslint/restrict-template-expressions
|
||||
fs.appendFileSync(output as unknown as fs.PathOrFileDescriptor, `${key}=${value}${os.EOL}`);
|
||||
}
|
||||
|
||||
updateStatus() {
|
||||
if (ExecuteBatch.cancelled) {
|
||||
return;
|
||||
|
|
Loading…
Reference in a new issue