ci: fix sonarcloud deprecations

- Use `sonar.token` instead of `sonar.login` since the latter is
  deprecated.
- Explicitly install Java 17 since v11 (bundled by default) is
  deprecated by Sonarcloud.

Caching was not implemented this time around because it's not possible
to cache analysis results yet, only the installed binaries. See this
thread for information:

https://community.sonarsource.com/t/proper-caching-for-ci-builds/98320/2
json-serializing-nullable-fields-issue
Robert Dailey 1 year ago
parent 06cdd992e9
commit 9365e2649f

@ -28,6 +28,13 @@ jobs:
with:
fetch-depth: 0 # avoid shallow clone for GitVersion
# GH Runners come with Java 11, which is deprecated by Sonarcloud
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: 17
distribution: temurin
- name: Setup dotnet
uses: actions/setup-dotnet@v3
with:
@ -52,7 +59,7 @@ jobs:
-k:"recyclarr_recyclarr"
-n:"Recyclarr"
-v:"${{ steps.gitversion.outputs.fullSemVer }}"
-d:sonar.login="${{ secrets.SONAR_TOKEN }}"
-d:sonar.token="${{ secrets.SONAR_TOKEN }}"
-d:sonar.host.url="https://sonarcloud.io"
-d:sonar.cs.opencover.reportsPaths="**/TestResults/*/coverage.opencover.xml"
@ -67,4 +74,4 @@ jobs:
- name: End Sonar Scanner
run: >
dotnet sonarscanner end
-d:sonar.login="${{ secrets.SONAR_TOKEN }}"
-d:sonar.token="${{ secrets.SONAR_TOKEN }}"

Loading…
Cancel
Save