Skip to content

Commit

Permalink
feat: add support for specifying a recipe file path (#67)
Browse files Browse the repository at this point in the history
  • Loading branch information
20x-dz authored Jun 22, 2023
1 parent 58c8341 commit 26fe6d3
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
5 changes: 5 additions & 0 deletions action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,11 @@ inputs:
default: ''
description: Path to local Deployer binary.

recipe:
required: false
default: ''
description: Recipe file path.

ansi:
required: false
default: 'true'
Expand Down
7 changes: 6 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,11 @@ async function dep() {
}

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 verbosity = core.getInput('verbosity')
let options = []
Expand All @@ -121,7 +126,7 @@ async function dep() {
}

try {
await $`php ${dep} ${cmd} --no-interaction ${ansi} ${verbosity} ${options}`
await $`php ${dep} ${cmd} ${recipe} --no-interaction ${ansi} ${verbosity} ${options}`
} catch (err) {
core.setFailed(`Failed: dep ${cmd}`)
}
Expand Down

0 comments on commit 26fe6d3

Please sign in to comment.