diff --git a/README.md b/README.md index fab43df..b31a6f4 100644 --- a/README.md +++ b/README.md @@ -51,6 +51,14 @@ # You can specify path to your local Deployer binary in the repo. # Optional. deployer-binary: "bin/dep" + + # You can choose to disable ANSI output. + # Optional. Defaults to true. + ansi: false + + # You can specify the output verbosity level. + # Optional. Defaults to -v. + verbosity: -vvv ``` ## Example diff --git a/action.yaml b/action.yaml index 7168981..f5496d3 100644 --- a/action.yaml +++ b/action.yaml @@ -32,6 +32,16 @@ inputs: default: '' description: Path to local Deployer binary. + ansi: + required: false + default: 'true' + description: Whether to enable ANSI output. + + verbosity: + required: false + default: '-v' + description: Verbosity level Can be -v, -vv or -vvv. + runs: using: 'node12' main: 'index.js' diff --git a/index.js b/index.js index 843b7d2..efe01ba 100644 --- a/index.js +++ b/index.js @@ -81,8 +81,10 @@ async function dep() { } let cmd = core.getInput('dep') + let ansi = core.getBooleanInput('ansi') ? '--ansi' : '--no-ansi'; + let verbosity = core.getInput('verbosity'); - let p = execa.command(`php ${dep} --no-interaction --ansi -v ${cmd}`) + let p = execa.command(`php ${dep} --no-interaction ${ansi} ${verbosity} ${cmd}`) p.stdout.pipe(process.stdout) p.stderr.pipe(process.stderr)