name: Format PHP

on: pull_request

jobs:
  php-cs-fixer:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v1

    - name: Install
      run: composer install

    - name: Run php-cs-fixer
      run: ./vendor/bin/php-cs-fixer fix

    - uses: stefanzweifel/git-auto-commit-action@v2.1.0
      with:
        commit_message: Apply php-cs-fixer changes
        branch: ${{ github.head_ref }}
      env:
        GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Add Workflow to trigger php-cs-fixer on PRs
Add Workflow to trigger php-cs-fixer on PRs
