mirror of
https://github.com/deployphp/action.git
synced 2024-11-26 21:59:02 +00:00
Add ansi and verbosity input options (#42)
This commit is contained in:
parent
0bf91d3ad5
commit
56e7af68da
@ -51,6 +51,14 @@
|
|||||||
# You can specify path to your local Deployer binary in the repo.
|
# You can specify path to your local Deployer binary in the repo.
|
||||||
# Optional.
|
# Optional.
|
||||||
deployer-binary: "bin/dep"
|
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
|
## Example
|
||||||
|
10
action.yaml
10
action.yaml
@ -32,6 +32,16 @@ inputs:
|
|||||||
default: ''
|
default: ''
|
||||||
description: Path to local Deployer binary.
|
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:
|
runs:
|
||||||
using: 'node12'
|
using: 'node12'
|
||||||
main: 'index.js'
|
main: 'index.js'
|
||||||
|
4
index.js
4
index.js
@ -81,8 +81,10 @@ async function dep() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let cmd = core.getInput('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.stdout.pipe(process.stdout)
|
||||||
p.stderr.pipe(process.stderr)
|
p.stderr.pipe(process.stderr)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user