Update dependency gradle to v8.6 #472
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: Run diKTat | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
jobs: | |
diktat_check: | |
runs-on: ubuntu-22.04 | |
env: | |
GRADLE_OPTS: -Dorg.gradle.daemon=false | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up JDK 11 | |
uses: actions/setup-java@v3 | |
with: | |
java-version: 11 | |
distribution: zulu | |
- uses: gradle/gradle-build-action@v2 | |
with: | |
gradle-version: wrapper | |
arguments: | | |
diktatCheck | |
-Pdiktat.githubActions=true | |
-Pdetekt.multiplatform.disabled=true | |
# Upload reports only if code style checks were failed | |
- name: Copy SARIF reports into a single directory | |
if: ${{ failure() }} | |
run: | | |
mkdir -p build/diktat-sarif-reports | |
i=0 | |
find . -path "*/build/reports/diktat/*.sarif" | while read -r f; do echo "$f -> diktat-$i.sarif" && cp $f build/diktat-sarif-reports/diktat-$i.sarif || echo Cannot copy && echo Copied && i=$((i+1)); done | |
- name: Upload SARIF report to Github | |
uses: github/codeql-action/upload-sarif@v2 | |
if: ${{ failure() }} | |
with: | |
sarif_file: build/diktat-sarif-reports | |
- name: Upload SARIF artifacts | |
uses: actions/upload-artifact@v3 | |
if: ${{ failure() }} | |
with: | |
name: sarif-reports | |
path: "**/build/diktat-sarif-reports/" | |
retention-days: 1 |