mirror of
https://github.com/shivammathur/setup-php.git
synced 2024-11-22 20:01: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/**'
|
- 'examples/**'
|
||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
|
env:
|
||||||
|
default-php-version: '8.2'
|
||||||
jobs:
|
jobs:
|
||||||
run:
|
run:
|
||||||
name: Run
|
name: Run
|
||||||
@ -44,7 +45,7 @@ jobs:
|
|||||||
id: cache-env
|
id: cache-env
|
||||||
uses: shivammathur/cache-extensions@develop
|
uses: shivammathur/cache-extensions@develop
|
||||||
with:
|
with:
|
||||||
php-version: ${{ matrix.php-versions || 8.2 }}
|
php-version: ${{ matrix.php-versions || env.default-php-version }}
|
||||||
extensions: ${{ env.extensions }}
|
extensions: ${{ env.extensions }}
|
||||||
key: ${{ env.key }}
|
key: ${{ env.key }}
|
||||||
|
|
||||||
@ -58,7 +59,7 @@ jobs:
|
|||||||
- name: Stage php-version-file
|
- name: Stage php-version-file
|
||||||
if: ${{ matrix.php-version-file == 'php-version-file' }}
|
if: ${{ matrix.php-version-file == 'php-version-file' }}
|
||||||
run: |
|
run: |
|
||||||
echo 8.2 > php-version-file
|
echo ${{ env.default-php-version }} > php-version-file
|
||||||
|
|
||||||
- name: Setup PHP with extensions and custom config
|
- name: Setup PHP with extensions and custom config
|
||||||
run: node dist/index.js
|
run: node dist/index.js
|
||||||
@ -71,7 +72,7 @@ jobs:
|
|||||||
- name: Testing PHP version
|
- name: Testing PHP version
|
||||||
run: |
|
run: |
|
||||||
php -v
|
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
|
- name: Testing Composer version
|
||||||
run: |
|
run: |
|
||||||
|
Loading…
Reference in New Issue
Block a user