phpcsfixer.yml.disabled 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. name: GitHub CI PHPCS and PHPCBF
  2. on:
  3. pull_request:
  4. types: [opened]
  5. #on:
  6. # push:
  7. # paths:
  8. # - '**.php'
  9. jobs:
  10. #filesChanged:
  11. # uses: ./.github/workflows/files_changed.yaml
  12. # with:
  13. # folder_path: .*
  14. linter_name:
  15. name: Run & fix PHP Code Sniffer
  16. runs-on: ubuntu-latest
  17. #needs: filesChanged
  18. steps:
  19. - uses: actions/checkout@v3
  20. with:
  21. repository: ${{ github.event.pull_request.head.repo.full_name }}
  22. ref: ${{ github.event.pull_request.head.ref }}
  23. # fetch-depth: 10
  24. - name: echo Get list of all changed files
  25. run: |
  26. #echo ${{ needs.filesChanged.outputs.all_changed_files }}
  27. #echo boolean_output=${{ needs.filesChanged.outputs.boolean_output }}
  28. echo github.head_ref=${{github.head_ref}}
  29. echo github.base_ref=${{github.base_ref}}
  30. echo github.ref_name=${{github.ref_name}}
  31. - uses: eldy/phpcsfixer-action@master
  32. with:
  33. github_token: ${{ secrets.github_token }}
  34. use_default_configuration_file: false
  35. phpcs_standard: 'dev/setup/codesniffer/ruleset.xml'
  36. phpcs_head_ref: ${{github.head_ref}}
  37. phpcs_base_ref: ${{github.base_ref}}
  38. phpcs_ref_name: ${{github.ref_name}}
  39. phpcs_github_event_name: ${{github.event_name}}
  40. phpcs_files: ${{ needs.filesChanged.outputs.all_changed_files }}
  41. #- uses: stefanzweifel/git-auto-commit-action@v4 # auto commit the fixes action for GitHub
  42. # with:
  43. # commit_message: Fix PHPCS errors by GitHub PHPCSfixer action
  44. - name: Commit changes
  45. uses: EndBug/add-and-commit@v9.1.3
  46. with:
  47. default_author: github_actions
  48. committer_name: GitHub Actions
  49. committer_email: actions@github.com
  50. #author_name: PHP CS fixer
  51. #author_email: eldy@destailleur.fr
  52. #committer_name: PHP CS fixer
  53. #committer_email: eldy@destailleur.fr
  54. message: 'PHP CS fixer github action'
  55. add: '*.php'