This commit is contained in:
JoppeDC 2025-07-16 08:21:50 +02:00 committed by GitHub
commit 703868bf6c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 19 additions and 7 deletions

View file

@ -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

View file

@ -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'

View file

@ -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}`)
}