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:
parent
f08aa344e7
commit
d3c5a1eaed
2 changed files with 15 additions and 2 deletions
|
@ -24,5 +24,5 @@ inputs:
|
|||
required: false
|
||||
default: '.'
|
||||
runs:
|
||||
using: 'bash'
|
||||
main: 'start.sh'
|
||||
using: 'node12'
|
||||
main: 'start.js'
|
13
start.js
Normal file
13
start.js
Normal 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);
|
||||
})
|
Loading…
Add table
Add a link
Reference in a new issue