feat: allow tools path directory to be set

also add a .node-version file
This commit is contained in:
Sn0wCrack 2025-04-07 10:59:10 +10:00 committed by Shivam Mathur
parent 42a9487ddd
commit 310e481b83
No known key found for this signature in database
GPG Key ID: 3E13E4C8591ACC2A
5 changed files with 7 additions and 2 deletions

1
.node-version Normal file
View File

@ -0,0 +1 @@
20

View File

@ -27,6 +27,10 @@ inputs:
tools:
description: 'Setup popular tools globally.'
required: false
tools-dir:
description: 'Directory where all tools will be installed to.'
defaut: '/usr/local/bin'
required: false
outputs:
php-version:
description: 'PHP version in semver format'

2
dist/index.js vendored

File diff suppressed because one or more lines are too long

View File

@ -19,6 +19,7 @@ export async function getScript(os: string): Promise<string> {
const script_path = path.join(__dirname, '../src/scripts', filename);
const run_path = script_path.replace(os, 'run');
process.env['fail_fast'] = await utils.getInput('fail-fast', false);
process.env['tool_path_dir'] = await utils.getInput('tools-dir', false);
const extension_csv: string = await utils.getInput('extensions', false);
const ini_values_csv: string = await utils.getInput('ini-values', false);
const coverage_driver: string = await utils.getInput('coverage', false);

View File

@ -1,5 +1,4 @@
# Variables
export tool_path_dir="/usr/local/bin"
export composer_home="$HOME/.composer"
export composer_bin="$composer_home/vendor/bin"
export composer_json="$composer_home/composer.json"