prepare release #107
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | name: Auto Format PHP | |
| on: | |
| pull_request: | |
| paths: | |
| - '**.php' | |
| - 'cs2pr' | |
| jobs: | |
| php-cs-fixer: | |
| runs-on: ubuntu-latest | |
| # dont run on forks. requires commit access | |
| if: github.event.pull_request.head.repo.full_name == github.repository | |
| steps: | |
| - uses: actions/checkout@v2 | |
| with: | |
| ref: ${{ github.head_ref }} | |
| - name: Setup PHP | |
| uses: shivammathur/setup-php@v2 | |
| with: | |
| php-version: 7.0 | |
| coverage: none # disable xdebug, pcov | |
| tools: cs2pr | |
| - name: "Install dependencies with composer" | |
| run: "composer install --no-interaction --no-progress --no-suggest" | |
| - name: "Run friendsofphp/php-cs-fixer" | |
| run: "vendor/bin/php-cs-fixer fix --config=.php_cs --diff --diff-format=udiff --verbose" | |
| - uses: stefanzweifel/[email protected] | |
| with: | |
| commit_message: Apply php-cs-fixer changes | |
| branch: ${{ github.head_ref }} | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.STAABM_TOKEN }} | |
| - run: vendor/bin/php-cs-fixer fix --diff --dry-run --format=checkstyle | cs2pr # check whether there are still errors left |