chore: update name
All checks were successful
Test Action / Test Node (pull_request) Successful in 16s
Test Action / Test Without Dependencies (pull_request) Successful in 11s
Test Action / Test Custom Server Path (pull_request) Successful in 24s
Test Action / Test Build Command (pull_request) Successful in 27s
Test Action / Test nginx (pull_request) Successful in 38s
Test Action / Test PHP (pull_request) Successful in 1m0s
Test Action / Test All Components (pull_request) Successful in 1m28s
All checks were successful
Test Action / Test Node (pull_request) Successful in 16s
Test Action / Test Without Dependencies (pull_request) Successful in 11s
Test Action / Test Custom Server Path (pull_request) Successful in 24s
Test Action / Test Build Command (pull_request) Successful in 27s
Test Action / Test nginx (pull_request) Successful in 38s
Test Action / Test PHP (pull_request) Successful in 1m0s
Test Action / Test All Components (pull_request) Successful in 1m28s
Signed-off-by: Sebastian Krupinski <krupinski01@gmail.com>
This commit is contained in:
31
action.yml
31
action.yml
@@ -1,4 +1,4 @@
|
||||
name: 'Server Install Action'
|
||||
name: 'Nodarx Server Install Action'
|
||||
description: 'Clone Nodarx server repository and install Node.js, PHP, and/or nginx based on test requirements'
|
||||
author: 'Nodarx'
|
||||
|
||||
@@ -30,7 +30,7 @@ inputs:
|
||||
node-version:
|
||||
description: 'Node.js version to use (if install-node is true)'
|
||||
required: false
|
||||
default: '20'
|
||||
default: '24'
|
||||
package-manager:
|
||||
description: 'Package manager for Node.js (npm, yarn, pnpm)'
|
||||
required: false
|
||||
@@ -38,12 +38,12 @@ inputs:
|
||||
php-version:
|
||||
description: 'PHP version to use (if install-php is true)'
|
||||
required: false
|
||||
default: '8.2'
|
||||
default: '8.5'
|
||||
php-extensions:
|
||||
description: 'Comma-separated list of PHP extensions to install'
|
||||
required: false
|
||||
default: 'mbstring, xml, ctype, json, curl, zip'
|
||||
web-config:
|
||||
nginx-config:
|
||||
description: 'Path to nginx configuration file (optional)'
|
||||
required: false
|
||||
default: ''
|
||||
@@ -140,7 +140,7 @@ runs:
|
||||
coverage: none
|
||||
|
||||
- name: Install nginx
|
||||
if: inputs.install-web-server == 'true'
|
||||
if: inputs.install-nginx == 'true'
|
||||
shell: bash
|
||||
run: |
|
||||
echo "::group::Installing nginx"
|
||||
@@ -151,7 +151,7 @@ runs:
|
||||
echo "::endgroup::"
|
||||
|
||||
- name: Configure nginx
|
||||
if: inputs.install-web-server == 'true' && inputs.nginx-config != ''
|
||||
if: inputs.install-nginx == 'true' && inputs.nginx-config != ''
|
||||
shell: bash
|
||||
run: |
|
||||
echo "::group::Configuring nginx"
|
||||
@@ -159,23 +159,28 @@ runs:
|
||||
if [ -f "${{ inputs.nginx-config }}" ]; then
|
||||
sudo cp "${{ inputs.nginx-config }}" /etc/nginx/sites-available/default
|
||||
sudo nginx -t
|
||||
sudo systemctl reload nginx
|
||||
echo "nginx configured successfully"
|
||||
else
|
||||
echo "::warning::nginx config file not found: ${{ inputs.nginx-config }}"
|
||||
fi
|
||||
|
||||
echo "::endgroup::"
|
||||
echo "::endgroup:"
|
||||
|
||||
- name: Start nginx
|
||||
if: inputs.install-web-server == 'true'
|
||||
if: inputs.install-nginx == 'true'
|
||||
shell: bash
|
||||
run: |
|
||||
echo "::group::Starting nginx"
|
||||
sudo systemctl start nginx
|
||||
sudo systemctl status nginx --no-pager || true
|
||||
sudo nginx || echo "nginx may already be running"
|
||||
# Verify nginx is working
|
||||
if sudo nginx -t 2>/dev/null; then
|
||||
echo "✓ nginx configuration valid"
|
||||
fi
|
||||
if pgrep nginx >/dev/null; then
|
||||
echo "✓ nginx is running"
|
||||
fi
|
||||
echo "nginx started successfully"
|
||||
echo "::endgroup::"
|
||||
echo "::endgroup:"
|
||||
|
||||
- name: Install Node.js dependencies
|
||||
if: inputs.install-node == 'true' && inputs.install-dependencies == 'true'
|
||||
@@ -211,7 +216,7 @@ runs:
|
||||
cd "${{ inputs.server-path }}"
|
||||
|
||||
if [ -f "composer.json" ]; then
|
||||
composer install --no-dev --optimize-autoloader
|
||||
composer install --optimize-autoloader
|
||||
echo "PHP dependencies installed successfully"
|
||||
else
|
||||
echo "::warning::composer.json not found, skipping PHP dependency installation"
|
||||
|
||||
Reference in New Issue
Block a user