mirror of
https://github.com/deployphp/action.git
synced 2025-07-19 05:45:16 +00:00
Add custom branch option
This commit is contained in:
parent
f60b28c08a
commit
e1198c3769
3 changed files with 19 additions and 7 deletions
7
index.js
7
index.js
|
@ -124,15 +124,18 @@ async function dep() {
|
|||
} catch (e) {
|
||||
console.error('Invalid JSON in options')
|
||||
}
|
||||
|
||||
|
||||
let phpBin = 'php'
|
||||
let phpBinArg = core.getInput('php-binary');
|
||||
if (phpBinArg !== '') {
|
||||
phpBin = phpBinArg
|
||||
}
|
||||
|
||||
let branch = core.getInput('branch')
|
||||
let branchOption = branch !== '' ? `--branch=${branch}` : ''
|
||||
|
||||
try {
|
||||
await $`${phpBin} ${dep} ${cmd} ${recipe} --no-interaction ${ansi} ${verbosity} ${options}`
|
||||
await $`${phpBin} ${dep} ${cmd} ${recipe} --no-interaction ${ansi} ${verbosity} ${options} ${branchOption}`
|
||||
} catch (err) {
|
||||
core.setFailed(`Failed: dep ${cmd}`)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue