1
0
Fork 0
mirror of https://github.com/ad-m/github-push-action.git synced 2025-06-08 06:27:02 +09:00

Use nodejs to start bash

This commit is contained in:
Adam Dobrawy 2019-11-12 19:29:07 +01:00
parent f08aa344e7
commit d3c5a1eaed
2 changed files with 15 additions and 2 deletions

View file

@ -24,5 +24,5 @@ inputs:
required: false
default: '.'
runs:
using: 'bash'
main: 'start.sh'
using: 'node12'
main: 'start.js'

13
start.js Normal file
View file

@ -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);
})