diff --git a/action.yml b/action.yml index fa36f42..e583178 100644 --- a/action.yml +++ b/action.yml @@ -24,5 +24,5 @@ inputs: required: false default: '.' runs: - using: 'bash' - main: 'start.sh' + using: 'node12' + main: 'start.js' \ No newline at end of file diff --git a/start.js b/start.js new file mode 100644 index 0000000..2043c27 --- /dev/null +++ b/start.js @@ -0,0 +1,13 @@ +const spawn = require('child_process').spawn; + +const main = () => new Promise((resolve, reject) => { + const ssh = spawn('bash', ['start.sh'], { stdio: 'inherit' }); + ssh.on('close', resolve); + ssh.on('error', reject); +}); + +main().catch(err => { + console.err(err); + console.err(err.stack); + process.exit(-1); +}) \ No newline at end of file