Fix PHPCS workflow #110
This file contains 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: PHP Mess Detector | |
on: | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: [ "main" ] | |
permissions: | |
contents: read | |
jobs: | |
PHPMD: | |
name: PHPMD Scanner | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
security-events: write | |
actions: read | |
steps: | |
- name: Checkout Source Code | |
uses: actions/checkout@v4 | |
- name: Setup Environment | |
uses: php-actions/composer@v6 | |
with: | |
command: install | |
php_version: "8.1" | |
- name: Run PHP Mess Detector | |
uses: php-actions/phpmd@v1 | |
with: | |
path: bin/,public/,src/ | |
php_version: "8.1" | |
ruleset: .phpmd.dist.xml | |
output: sarif | |
reportfile: phpmd-results.sarif | |
- name: Upload Analysis Results | |
uses: github/codeql-action/upload-sarif@v3 | |
with: | |
sarif_file: phpmd-results.sarif | |
wait-for-processing: true |