cs-fixer.yml 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. name: CS Fixer
  2. on:
  3. push:
  4. branches: [ "main", "develop" ]
  5. pull_request:
  6. branches: [ "main", "develop" ]
  7. permissions:
  8. contents: write
  9. jobs:
  10. cs-fixer:
  11. runs-on: ubuntu-latest
  12. steps:
  13. - uses: actions/checkout@v3
  14. - name: Validate composer.json and composer.lock
  15. run: composer validate --strict
  16. - name: Install dependencies
  17. run: composer install --prefer-dist --no-progress
  18. - name: Cache Composer packages
  19. id: composer-cache
  20. uses: actions/cache@v3
  21. with:
  22. path: vendor
  23. key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}
  24. restore-keys: |
  25. ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}
  26. - name: Run PHP CS Fixer
  27. uses: docker://oskarstark/php-cs-fixer-ga
  28. with:
  29. args: --config=.php-cs-fixer.dist.php --allow-risky=yes
  30. - name: Commit changes
  31. uses: stefanzweifel/git-auto-commit-action@v4
  32. with:
  33. commit_message: Fix styling