mirror of
https://github.com/deployphp/action.git
synced 2024-11-26 21:59:02 +00:00
feat: add support for specifying a recipe file path (#67)
This commit is contained in:
parent
58c8341484
commit
26fe6d39eb
@ -48,6 +48,11 @@ inputs:
|
|||||||
default: ''
|
default: ''
|
||||||
description: Path to local Deployer binary.
|
description: Path to local Deployer binary.
|
||||||
|
|
||||||
|
recipe:
|
||||||
|
required: false
|
||||||
|
default: ''
|
||||||
|
description: Recipe file path.
|
||||||
|
|
||||||
ansi:
|
ansi:
|
||||||
required: false
|
required: false
|
||||||
default: 'true'
|
default: 'true'
|
||||||
|
7
index.js
7
index.js
@ -106,6 +106,11 @@ async function dep() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let cmd = core.getInput('dep').split(' ')
|
let cmd = core.getInput('dep').split(' ')
|
||||||
|
let recipe = core.getInput('recipe')
|
||||||
|
if (recipe !== '') {
|
||||||
|
recipe = `--file=${recipe}`
|
||||||
|
}
|
||||||
|
|
||||||
let ansi = core.getBooleanInput('ansi') ? '--ansi' : '--no-ansi'
|
let ansi = core.getBooleanInput('ansi') ? '--ansi' : '--no-ansi'
|
||||||
let verbosity = core.getInput('verbosity')
|
let verbosity = core.getInput('verbosity')
|
||||||
let options = []
|
let options = []
|
||||||
@ -121,7 +126,7 @@ async function dep() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
await $`php ${dep} ${cmd} --no-interaction ${ansi} ${verbosity} ${options}`
|
await $`php ${dep} ${cmd} ${recipe} --no-interaction ${ansi} ${verbosity} ${options}`
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
core.setFailed(`Failed: dep ${cmd}`)
|
core.setFailed(`Failed: dep ${cmd}`)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user