mirror of
https://github.com/shivammathur/setup-php.git
synced 2024-11-22 03:41:06 +07:00
Minor refactor in php.yml
This commit is contained in:
parent
a36edd3ca4
commit
755bbb1cc0
9
.github/workflows/php.yml
vendored
9
.github/workflows/php.yml
vendored
@ -19,7 +19,8 @@ on:
|
||||
- 'examples/**'
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
env:
|
||||
default-php-version: '8.2'
|
||||
jobs:
|
||||
run:
|
||||
name: Run
|
||||
@ -44,7 +45,7 @@ jobs:
|
||||
id: cache-env
|
||||
uses: shivammathur/cache-extensions@develop
|
||||
with:
|
||||
php-version: ${{ matrix.php-versions || 8.2 }}
|
||||
php-version: ${{ matrix.php-versions || env.default-php-version }}
|
||||
extensions: ${{ env.extensions }}
|
||||
key: ${{ env.key }}
|
||||
|
||||
@ -58,7 +59,7 @@ jobs:
|
||||
- name: Stage php-version-file
|
||||
if: ${{ matrix.php-version-file == 'php-version-file' }}
|
||||
run: |
|
||||
echo 8.2 > php-version-file
|
||||
echo ${{ env.default-php-version }} > php-version-file
|
||||
|
||||
- name: Setup PHP with extensions and custom config
|
||||
run: node dist/index.js
|
||||
@ -71,7 +72,7 @@ jobs:
|
||||
- name: Testing PHP version
|
||||
run: |
|
||||
php -v
|
||||
php -r "if(strpos(phpversion(), '${{ matrix.php-versions || 8.2 }}') === false) {throw new Exception('Wrong PHP version Installed');}"
|
||||
php -r "if(strpos(phpversion(), '${{ matrix.php-versions || env.default-php-version }}') === false) {throw new Exception('Wrong PHP version Installed');}"
|
||||
|
||||
- name: Testing Composer version
|
||||
run: |
|
||||
|
Loading…
Reference in New Issue
Block a user