Files
starter-workflows/code-scanning/pmd.yml
T

37 lines
976 B
YAML
Raw Normal View History

2021-10-27 15:35:18 -04:00
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
name: pmd
on:
push:
branches: [ $default-branch, $protected-branches ]
pull_request:
branches: [ $default-branch ]
schedule:
- cron: $cron-weekly
jobs:
2021-12-01 15:50:22 -05:00
pmd-code-scan:
2021-10-27 15:35:18 -04:00
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
2021-12-01 15:50:22 -05:00
- name: Set up JDK 11
uses: actions/setup-java@v2
2021-10-27 15:35:18 -04:00
with:
2021-12-01 15:50:22 -05:00
java-version: '11'
2021-12-20 11:44:55 +01:00
distribution: 'temurin'
2021-12-01 15:50:22 -05:00
cache: maven
- name: Run PMD
id: pmd
2021-12-20 11:44:55 +01:00
uses: pmd/pmd-github-action@6d98898be0d59f46ec37dafcea33d8f8f55acfd1
2021-10-27 15:35:18 -04:00
with:
2021-12-01 15:50:22 -05:00
rulesets: 'rulesets/java/quickstart.xml'
sourcePath: 'src/main/java'
- name: Upload SARIF file
2021-10-27 15:35:18 -04:00
uses: github/codeql-action/upload-sarif@v1
with:
2021-12-01 15:50:22 -05:00
sarif_file: pmd-report.sarif