Skip to content

Set up your GitHub Actions workflow with a specific version of PHP 5.4 or later🎉

License

Notifications You must be signed in to change notification settings

langleyfoxall/setup-php

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

setup-php

GitHub Actions status LICENSE PHP Versions Supported

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
  • 5.5
  • 5.6
  • 7.0
  • 7.1
  • 7.2
  • 7.3
  • 7.4
  • 8.0

Patch version can also be set. e.g. 7.2.11

OS/Platform support

  • ubuntu-latest, ubuntu-20.04, ubuntu-18.04, or ubuntu-16.04
  • windows-latest, windows-2019, or windows-2016

Usage

See action.yml

Basic:

steps:
- uses: actions/checkout@master
- uses: nanasess/setup-php@master
  with:
    php-version: '7.4'
- run: php my_script.php

Matrix Testing:

jobs:
  build:
    runs-on: ${{ matrix.operating-system }}
    strategy:
      matrix:
        operating-system: [ ubuntu-18.04, windows-2019 ]
        php: [ '5.4', '5.5', '5.6', '7.1', '7.2', '7.3', '7.4', '7.3.3' ]
    name: PHP ${{ matrix.php }} sample
    steps:
      - uses: actions/checkout@master
      - name: Setup PHP
        uses: nanasess/setup-php@master
        with:
          php-version: ${{ matrix.php }}
      - run: php my_script.php

License

The scripts and documentation in this project are released under the MIT License

Contributions

Contributions are welcome! See Contributor's Guide

About

Set up your GitHub Actions workflow with a specific version of PHP 5.4 or later🎉

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Shell 37.1%
  • JavaScript 30.7%
  • TypeScript 24.8%
  • PowerShell 7.4%