Output PHP_VERSION as an env too.
This commit is contained in:
parent
8635216376
commit
d3610b8364
2 changed files with 20 additions and 0 deletions
10
README.md
10
README.md
|
@ -1,2 +1,12 @@
|
|||
# action-setup-php
|
||||
Sets up a PHP project with GitHub Actions, including detecting PHP version and running composer install.
|
||||
|
||||
## Inputs:
|
||||
- `working_directory`: The directory to run the PHP setup in. Default: `.`.
|
||||
- `php_tools`: The PHP tools to install.
|
||||
|
||||
## Outputs:
|
||||
- `php_version`: The PHP version that was detected.
|
||||
|
||||
## Exported Envs:
|
||||
- `PHP_VERSION`: The PHP version that was detected.
|
10
action.yml
10
action.yml
|
@ -53,4 +53,14 @@ runs:
|
|||
with:
|
||||
path: ${{ steps.composer-cache-find.outputs.dir }}
|
||||
key: ${{ steps.composer-cache-find.outputs.key }}
|
||||
- shell: bash
|
||||
run: |
|
||||
echo "PHP Version: ${{ steps.read-php-version.outputs.php_version }}"
|
||||
echo "PHP Tools: ${{ inputs.php_tools }}"
|
||||
echo "Composer Cache Dir: ${{ steps.composer-cache-find.outputs.dir }}"
|
||||
echo "Composer Cache Key: ${{ steps.composer-cache-find.outputs.key }}"
|
||||
echo "Composer Cache Restore Key: ${{ steps.composer-cache-find.outputs.restore-key }}"
|
||||
{
|
||||
echo "PHP_VERSION=${{ steps.read-php-version.outputs.php_version }}"
|
||||
} >> $GITHUB_ENV
|
||||
|
||||
|
|
Loading…
Reference in a new issue