mirror of
https://github.com/hoverkraft-tech/compose-action.git
synced 2026-01-11 15:13:06 +08:00
Break out assembly of dict
This commit is contained in:
parent
63dffdd9f8
commit
4ee978ae61
9
post.js
9
post.js
@ -4,14 +4,19 @@ const fs = require('fs');
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
const composeFile = core.getInput('compose-file');
|
const composeFile = core.getInput('compose-file');
|
||||||
const downOptions = core.getInput('down-options').split(" ");
|
const downOptionsString = core.getInput('down-options');
|
||||||
|
|
||||||
|
if (downOptionsString.length > 0)
|
||||||
|
let options = { config: composeFile, log: true, commandOptions: downOptionsString.split(" ") };
|
||||||
|
else
|
||||||
|
let options = { config: composeFile, log: true};
|
||||||
|
|
||||||
if (!fs.existsSync(composeFile)) {
|
if (!fs.existsSync(composeFile)) {
|
||||||
console.log(`${composeFile} not exists`);
|
console.log(`${composeFile} not exists`);
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
compose.down({ config: composeFile, log: true, commandOptions: downOptions })
|
compose.down(options)
|
||||||
.then(
|
.then(
|
||||||
() => { console.log('compose removed')},
|
() => { console.log('compose removed')},
|
||||||
err => { core.setFailed(`compose down failed ${err}`)}
|
err => { core.setFailed(`compose down failed ${err}`)}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user