Skip to content

Commit 2e00d30

Browse files
authored
merge PR #30 Update to .Net 6
2 parents 37dca42 + c4d4b9a commit 2e00d30

File tree

5 files changed

+12
-13
lines changed

5 files changed

+12
-13
lines changed

.github/workflows/ci-build.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
- name: Setup .Net
1818
uses: actions/setup-dotnet@v1
1919
with:
20-
dotnet-version: 5.0.x
20+
dotnet-version: 6.0.x
2121

2222
- name: Restore Dependencies
2323
run: dotnet restore src/CodeCoverageSummary.sln
@@ -26,4 +26,4 @@ jobs:
2626
run: dotnet build src/CodeCoverageSummary.sln --configuration Release --no-restore
2727

2828
- name: Test with sample file
29-
run: dotnet src/CodeCoverageSummary/bin/Release/net5.0/CodeCoverageSummary.dll --files src/coverage.cobertura.xml --badge true
29+
run: dotnet src/CodeCoverageSummary/bin/Release/net6.0/CodeCoverageSummary.dll --files src/coverage.cobertura.xml --badge true

.github/workflows/release-build.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
- name: Setup .Net
2222
uses: actions/setup-dotnet@v1
2323
with:
24-
dotnet-version: 5.0.x
24+
dotnet-version: 6.0.x
2525

2626
- name: Restore Dependencies
2727
run: dotnet restore src/CodeCoverageSummary.sln
@@ -30,7 +30,7 @@ jobs:
3030
run: dotnet build src/CodeCoverageSummary.sln --configuration Release --no-restore
3131

3232
- name: Test with sample file
33-
run: dotnet src/CodeCoverageSummary/bin/Release/net5.0/CodeCoverageSummary.dll src/coverage.cobertura.xml --badge true
33+
run: dotnet src/CodeCoverageSummary/bin/Release/net6.0/CodeCoverageSummary.dll src/coverage.cobertura.xml --badge true
3434

3535
- name: Get Previous Tag
3636
id: get_previous_tag

Dockerfile

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
1-
FROM mcr.microsoft.com/dotnet/sdk:5.0 AS build
1+
FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build
2+
COPY ["src/coverage.cobertura.xml", "/publish/sample.coverage.xml"]
23
WORKDIR /src
34
COPY ["src/CodeCoverageSummary/CodeCoverageSummary.csproj", "CodeCoverageSummary/"]
45
RUN dotnet restore CodeCoverageSummary/CodeCoverageSummary.csproj
56
COPY ["src/CodeCoverageSummary", "CodeCoverageSummary/"]
6-
COPY ["src/coverage.cobertura.xml", "sample.coverage.xml"]
7-
RUN dotnet build CodeCoverageSummary/CodeCoverageSummary.csproj --configuration Release --no-restore --output /app/build
8-
RUN dotnet publish CodeCoverageSummary/CodeCoverageSummary.csproj --configuration Release --no-restore --output /app/publish
7+
RUN dotnet publish CodeCoverageSummary/CodeCoverageSummary.csproj --configuration Release --no-restore --output /publish
98

109
# Label the container
1110
LABEL maintainer="Irongut <murray.dave@outlook.com>"
@@ -18,8 +17,8 @@ LABEL com.github.actions.description="A GitHub Action that reads Cobertura forma
1817
LABEL com.github.actions.icon="book-open"
1918
LABEL com.github.actions.color="purple"
2019

21-
FROM mcr.microsoft.com/dotnet/runtime:5.0 AS final
20+
FROM mcr.microsoft.com/dotnet/runtime:6.0 AS final
2221
WORKDIR /app
23-
COPY --from=build /app/publish .
24-
COPY --from=build /src/sample.coverage.xml .
22+
COPY --from=build /publish .
23+
ENV DOTNET_EnableDiagnostics=0
2524
ENTRYPOINT ["dotnet", "/app/CodeCoverageSummary.dll"]

src/CodeCoverageSummary/CodeCoverageSummary.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
<PropertyGroup>
44
<OutputType>Exe</OutputType>
5-
<TargetFramework>net5.0</TargetFramework>
5+
<TargetFramework>net6.0</TargetFramework>
66
<DockerDefaultTargetOS>Linux</DockerDefaultTargetOS>
77
<Company>Taranis Software</Company>
88
<Authors>Irongut</Authors>

src/CodeCoverageSummary/Properties/launchSettings.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
},
77
"Docker": {
88
"commandName": "Docker",
9-
"commandLineArgs": "/src/coverage.cobertura.xml --format=md --badge=true"
9+
"commandLineArgs": "--files /app/sample.coverage.xml --format=text --badge=true"
1010
}
1111
}
1212
}

0 commit comments

Comments
 (0)