mirror of
https://github.com/deployphp/action.git
synced 2025-07-18 21:35:16 +00:00
Merge e1198c3769
into f60b28c08a
This commit is contained in:
commit
703868bf6c
3 changed files with 19 additions and 7 deletions
|
@ -78,6 +78,10 @@
|
|||
# You can specify the output verbosity level.
|
||||
# Optional. Defaults to -v.
|
||||
verbosity: -vvv
|
||||
|
||||
# The branch to deploy. Adds --branch=value to the deploy command.
|
||||
# Optional.
|
||||
branch: "main"
|
||||
```
|
||||
|
||||
## Example
|
||||
|
|
|
@ -68,6 +68,11 @@ inputs:
|
|||
default: '-v'
|
||||
description: Verbosity level Can be -v, -vv or -vvv.
|
||||
|
||||
branch:
|
||||
required: false
|
||||
default: ''
|
||||
description: The branch to deploy.
|
||||
|
||||
runs:
|
||||
using: 'node20'
|
||||
main: 'index.js'
|
||||
|
|
5
index.js
5
index.js
|
@ -131,8 +131,11 @@ async function dep() {
|
|||
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