Skip to content

Commit

Permalink
Add support to run PHP 8 deployments (#1)
Browse files Browse the repository at this point in the history
* Add support for running custom PHP version

* Update action.yml

* Update action.yml

* Update action.yml

* Update action.yml

* Update README.md
  • Loading branch information
cristiroma authored Nov 28, 2022
1 parent 29be7c6 commit fd68e33
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,5 @@ jobs:
## Inputs

- `dev` - (Default: `false`) - When `true` it installs all composer dependencies (including development). This is useful when creating a release to run tests.
- `php` - (Default: `/usr/bin/php`) - Absolute path to the PHP executable when the project is using a different version such as PHP 8.1, e.g. `/usr/bin/php81`.
- `composer` - (Default: `/usr/bin/composer`) - Absolute path to the `composer` executable
12 changes: 10 additions & 2 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,14 @@ inputs:
description: 'Prod or development release (composer --dev)'
required: true
default: 'false'
php:
description: 'Absolute path to PHP executable to use when running composer'
required: false
default: '/usr/bin/php'
composer:
description: 'Absolute path to the composer executable'
required: false
default: '/usr/bin/composer'

runs:
using: "composite"
Expand All @@ -15,10 +23,10 @@ runs:

- name: "Install prod dependencies"
if: ${{ inputs.dev == 'false' }}
run: composer install --no-ansi --no-dev --no-interaction --no-progress --optimize-autoloader
run: ${{ inputs.php }} ${{ inputs.composer }} install --no-ansi --no-dev --no-interaction --no-progress --optimize-autoloader
shell: bash

- name: "Install dev dependencies"
if: ${{ inputs.dev == 'true' }}
run: composer install --no-ansi --no-interaction --no-progress
run: ${{ inputs.php }} ${{ inputs.composer }} install --no-ansi --no-interaction --no-progress
shell: bash

0 comments on commit fd68e33

Please sign in to comment.