From 84770a210d953dccea2a9992d2ebb1300c23a6d3 Mon Sep 17 00:00:00 2001 From: Nikolaj Stockholm Date: Tue, 7 May 2024 12:27:55 +0200 Subject: [PATCH 1/2] feat: Support different php binary. --- README.md | 4 ++++ index.js | 8 +++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 0d6c0c1..7f62e8e 100644 --- a/README.md +++ b/README.md @@ -18,6 +18,10 @@ # `deploy all`. # Required. dep: deploy + + # The path to the PHP binary to use. + # Optional. + php-binary: "php" # Specifies a sub directory within the repository to deploy # Optional diff --git a/index.js b/index.js index ae4ad58..b50cc0b 100644 --- a/index.js +++ b/index.js @@ -124,9 +124,15 @@ async function dep() { } catch (e) { console.error('Invalid JSON in options') } + + let phpBin = 'php' + let phpBinArg = core.getInput('php-binary'); + if (phpBinArg !== '') { + phpBin = phpBinArg + } try { - await $`php ${dep} ${cmd} ${recipe} --no-interaction ${ansi} ${verbosity} ${options}` + await $`${phpBin} ${dep} ${cmd} ${recipe} --no-interaction ${ansi} ${verbosity} ${options}` } catch (err) { core.setFailed(`Failed: dep ${cmd}`) } From b3a2552b9aa2d6f59069935e0588de05d6b57a6a Mon Sep 17 00:00:00 2001 From: Nikolaj Stockholm Date: Tue, 7 May 2024 12:32:07 +0200 Subject: [PATCH 2/2] feat: Support different php binary. --- action.yaml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/action.yaml b/action.yaml index b610af2..f69e11f 100644 --- a/action.yaml +++ b/action.yaml @@ -7,6 +7,11 @@ inputs: dep: required: true description: The command. + + php-binary: + required: false + default: '' + description: Path to PHP binary. sub-directory: required: false