From 38e1ff72b3d654dd395a5f14c92963d8dd84c221 Mon Sep 17 00:00:00 2001 From: Sebastian Meyer Date: Tue, 21 Nov 2023 17:59:45 +0100 Subject: [PATCH] Revert "Remove PHPMD workflow" This reverts commit 38d566b9dcf9174778bf427ac4ef1c44df7c1078. --- .github/workflows/phpmd.yml | 41 +++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 .github/workflows/phpmd.yml diff --git a/.github/workflows/phpmd.yml b/.github/workflows/phpmd.yml new file mode 100644 index 0000000..e745eb6 --- /dev/null +++ b/.github/workflows/phpmd.yml @@ -0,0 +1,41 @@ +name: PHPMD + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + schedule: + - cron: '00 03 * * 1' + +permissions: + contents: read + +jobs: + PHPMD: + name: Run PHPMD Scanning + 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: shivammathur/setup-php@v2 + with: + coverage: none + tools: phpmd + + - name: Run PHPMD + run: phpmd . sarif codesize --reportfile phpmd-results.sarif + continue-on-error: true + + - name: Upload Analysis Results + uses: github/codeql-action/upload-sarif@v2 + with: + sarif_file: phpmd-results.sarif + wait-for-processing: true