https://github.com/nanasess/setup-php
Set up your GitHub Actions workflow with a specific version of PHP 5.4 or later🎉
https://github.com/nanasess/setup-php
Last synced: 6 months ago
JSON representation
Set up your GitHub Actions workflow with a specific version of PHP 5.4 or later🎉
- Host: GitHub
- URL: https://github.com/nanasess/setup-php
- Owner: nanasess
- License: mit
- Created: 2019-09-05T02:50:50.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2024-10-21T07:39:11.000Z (12 months ago)
- Last Synced: 2024-10-24T15:38:29.940Z (12 months ago)
- Language: JavaScript
- Homepage: https://www.php.net
- Size: 59.3 MB
- Stars: 37
- Watchers: 3
- Forks: 14
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# setup-php
This action sets up a PHP environment for use in actions by:
- optionally installing a version of PHP and adding to PATH.
- registering problem matchers for error output## PHP version support
- 5.4(ubuntu-22.04 or ubuntu-20.04 only)
- 5.5(ubuntu-22.04 or ubuntu-20.04 only)
- 5.6
- 7.0
- 7.1
- 7.2
- 7.3
- 7.4
- 8.0
- 8.1
- 8.2
- 8.3*Patch version can also be set. e.g. 7.2.11*
## OS/Platform support
- ubuntu-latest, ubuntu-24.04, ubuntu-22.04 or ubuntu-20.04
- windows-latest, windows-2022 or windows-2019# Usage
See [action.yml](action.yml)
Basic:
```yaml
steps:
- uses: actions/checkout@v3
- uses: nanasess/setup-php@v4
with:
php-version: '8.2'
- run: php my_script.php
```Matrix Testing:
```yaml
jobs:
build:
runs-on: ${{ matrix.operating-system }}
strategy:
matrix:
operating-system: [ ubuntu-latest, windows-latest ]
php: [ '5.6', '7.1', '7.2', '7.3', '7.4', '7.3.3' ]
name: PHP ${{ matrix.php }} sample
steps:
- uses: actions/checkout@v3
- name: Setup PHP
uses: nanasess/setup-php@v4
with:
php-version: ${{ matrix.php }}
- run: php my_script.php
```# License
The scripts and documentation in this project are released under the [MIT License](LICENSE)
# Contributions
Contributions are welcome! See [Contributor's Guide](docs/contributors.md)