Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Proposal to support a different php binary #82

Merged
merged 2 commits into from
May 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 5 additions & 0 deletions action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 7 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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}`)
}
Expand Down