Skip to content

Commit

Permalink
Feature/dotnet6 (#11)
Browse files Browse the repository at this point in the history
* Use dotnet 6 SDK for build/test.

* Bump SonarScanner tool version.

* Update README.md.
  • Loading branch information
highbyte authored Nov 8, 2021
1 parent 6584149 commit 45bfcae
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 15 deletions.
8 changes: 4 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
FROM mcr.microsoft.com/dotnet/sdk:5.0
FROM mcr.microsoft.com/dotnet/sdk:6.0

LABEL "com.github.actions.name"="sonarscan-dotnet"
LABEL "com.github.actions.description"="Sonarscanner for .NET 5 with pull request decoration support."
LABEL "com.github.actions.description"="Sonarscanner for .NET 6 with pull request decoration support."
LABEL "com.github.actions.icon"="check-square"
LABEL "com.github.actions.color"="blue"

Expand All @@ -10,7 +10,7 @@ LABEL "homepage"="https://github.com/highbyte"
LABEL "maintainer"="Highbyte"

# Version numbers of used software
ENV SONAR_SCANNER_DOTNET_TOOL_VERSION=5.0.3 \
ENV SONAR_SCANNER_DOTNET_TOOL_VERSION=5.3.2 \
DOTNETCORE_RUNTIME_VERSION=5.0 \
JRE_VERSION=11

Expand All @@ -21,7 +21,7 @@ RUN wget https://packages.microsoft.com/config/debian/10/packages-microsoft-prod
# Fix JRE Install https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=863199
RUN mkdir -p /usr/share/man/man1

# Install the .NET 5 Runtime for SonarScanner.
# Install the .NET Runtime for SonarScanner
# The warning message "delaying package configuration, since apt-utils is not installed" is probably not an actual error, just a warning.
# We don't need apt-utils, we won't install it. The image seems to work even with the warning.
RUN apt-get update -y \
Expand Down
23 changes: 12 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@

SonarScanner for .NET for use in Github Actions, with automatic pull request detection, analysis and decoration.

The current version supports .NET 5.
The current version supports .NET 6
- For .NET 5, use version [2.0](https://github.com/marketplace/actions/sonarscan-dotnet?version=2.0)
- For .NET Core 3.1, use version [1.0.2](https://github.com/marketplace/actions/sonarscan-dotnet?version=1.0.2)

<img src="images/sonarqube-pullrequest-decoration-fail.png" width="50%" height="50%" title="SonarQube pull request decoration fail"><img src="images/sonarqube-pullrequest-decoration-pass.png" width="50%" height="50%" title="SonarQube pull request decoration pass">
Expand All @@ -13,8 +14,8 @@ The current version supports .NET 5.
## Simple use with SonarCloud

``` yaml
- name: SonarScanner for .NET 5 with pull request decoration support
uses: highbyte/sonarscan-dotnet@2.0
- name: SonarScanner for .NET 6 with pull request decoration support
uses: highbyte/sonarscan-dotnet@v2.1.2
with:
# The key of the SonarQube project
sonarProjectKey: your_projectkey
Expand All @@ -32,8 +33,8 @@ The current version supports .NET 5.
Also includes test results.
``` yaml
- name: SonarScanner for .NET 5 with pull request decoration support
uses: highbyte/sonarscan-dotnet@2.0
- name: SonarScanner for .NET 6 with pull request decoration support
uses: highbyte/sonarscan-dotnet@v2.1.2
with:
# The key of the SonarQube project
sonarProjectKey: your_projectkey
Expand All @@ -55,8 +56,8 @@ Also includes test results.
Also includes test results.
``` yaml
- name: SonarScanner for .NET 5 with pull request decoration support
uses: highbyte/sonarscan-dotnet@2.0
- name: SonarScanner for .NET 6 with pull request decoration support
uses: highbyte/sonarscan-dotnet@v2.1.2
with:
# The key of the SonarQube project
sonarProjectKey: your_projectkey
Expand All @@ -79,8 +80,8 @@ Also includes test results.
## Skip tests
``` yaml
- name: SonarScanner for .NET 5 with pull request decoration support
uses: highbyte/sonarscan-dotnet@2.0
- name: SonarScanner for .NET 6 with pull request decoration support
uses: highbyte/sonarscan-dotnet@v2.1.2
with:
# The key of the SonarQube project
sonarProjectKey: your_projectkey
Expand All @@ -99,8 +100,8 @@ Also includes test results.
## Use with self-hosted SonarQube
``` yaml
- name: SonarScanner for .NET 5 with pull request decoration support
uses: highbyte/sonarscan-dotnet@2.0
- name: SonarScanner for .NET 6 with pull request decoration support
uses: highbyte/sonarscan-dotnet@v2.1.2
with:
# The key of the SonarQube project
sonarProjectKey: your_projectkey
Expand Down

0 comments on commit 45bfcae

Please sign in to comment.