From 16dfb96e6d975a0a238991219414064dbfc3e0c5 Mon Sep 17 00:00:00 2001 From: "pleo-file-distributor[bot]" <114988919+pleo-file-distributor[bot]@users.noreply.github.com> Date: Tue, 30 Jan 2024 13:21:11 +0000 Subject: [PATCH] Update files based on repository configuration --- .github/workflows/build-and-test.yaml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/.github/workflows/build-and-test.yaml b/.github/workflows/build-and-test.yaml index c8f63b57..9a682ced 100644 --- a/.github/workflows/build-and-test.yaml +++ b/.github/workflows/build-and-test.yaml @@ -128,6 +128,24 @@ jobs: check_name: Unit Tests report report_paths: "**/build/test-results/test/TEST-*.xml" + # Run Detekt + - name: Run Detekt + continue-on-error: true + if: ${{ github.ref == 'refs/heads/main' }} + run: ./gradlew detekt --stacktrace + env: + GITHUB_TOKEN: ${{ secrets.GH_REGISTRY_GRADLE_TOKEN }} + GRADLE_READ_KEY: ${{ secrets.GH_REGISTRY_GRADLE_TOKEN }} + JOB_RUNR_REPO_PASSWORD: ${{ secrets.JOB_RUNR_REPO_PASSWORD }} + + # Publish Detekt results to GitHub. + - name: Publish Detekt SARIF report to GitHub + continue-on-error: true + if: ${{ github.ref == 'refs/heads/main' }} + uses: github/codeql-action/upload-sarif@v2 + with: + sarif_file: build/reports/detekt/detekt.sarif + - name: Trigger release if: ${{ github.ref == 'refs/heads/main' }} uses: peter-evans/repository-dispatch@v2