Skip to content

Commit

Permalink
merge PR #30 Update to .Net 6
Browse files Browse the repository at this point in the history
  • Loading branch information
irongut authored Nov 24, 2021
2 parents 37dca42 + c4d4b9a commit 2e00d30
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 13 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
- name: Setup .Net
uses: actions/setup-dotnet@v1
with:
dotnet-version: 5.0.x
dotnet-version: 6.0.x

- name: Restore Dependencies
run: dotnet restore src/CodeCoverageSummary.sln
Expand All @@ -26,4 +26,4 @@ jobs:
run: dotnet build src/CodeCoverageSummary.sln --configuration Release --no-restore

- name: Test with sample file
run: dotnet src/CodeCoverageSummary/bin/Release/net5.0/CodeCoverageSummary.dll --files src/coverage.cobertura.xml --badge true
run: dotnet src/CodeCoverageSummary/bin/Release/net6.0/CodeCoverageSummary.dll --files src/coverage.cobertura.xml --badge true
4 changes: 2 additions & 2 deletions .github/workflows/release-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
- name: Setup .Net
uses: actions/setup-dotnet@v1
with:
dotnet-version: 5.0.x
dotnet-version: 6.0.x

- name: Restore Dependencies
run: dotnet restore src/CodeCoverageSummary.sln
Expand All @@ -30,7 +30,7 @@ jobs:
run: dotnet build src/CodeCoverageSummary.sln --configuration Release --no-restore

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

- name: Get Previous Tag
id: get_previous_tag
Expand Down
13 changes: 6 additions & 7 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
FROM mcr.microsoft.com/dotnet/sdk:5.0 AS build
FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build
COPY ["src/coverage.cobertura.xml", "/publish/sample.coverage.xml"]
WORKDIR /src
COPY ["src/CodeCoverageSummary/CodeCoverageSummary.csproj", "CodeCoverageSummary/"]
RUN dotnet restore CodeCoverageSummary/CodeCoverageSummary.csproj
COPY ["src/CodeCoverageSummary", "CodeCoverageSummary/"]
COPY ["src/coverage.cobertura.xml", "sample.coverage.xml"]
RUN dotnet build CodeCoverageSummary/CodeCoverageSummary.csproj --configuration Release --no-restore --output /app/build
RUN dotnet publish CodeCoverageSummary/CodeCoverageSummary.csproj --configuration Release --no-restore --output /app/publish
RUN dotnet publish CodeCoverageSummary/CodeCoverageSummary.csproj --configuration Release --no-restore --output /publish

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

FROM mcr.microsoft.com/dotnet/runtime:5.0 AS final
FROM mcr.microsoft.com/dotnet/runtime:6.0 AS final
WORKDIR /app
COPY --from=build /app/publish .
COPY --from=build /src/sample.coverage.xml .
COPY --from=build /publish .
ENV DOTNET_EnableDiagnostics=0
ENTRYPOINT ["dotnet", "/app/CodeCoverageSummary.dll"]
2 changes: 1 addition & 1 deletion src/CodeCoverageSummary/CodeCoverageSummary.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net5.0</TargetFramework>
<TargetFramework>net6.0</TargetFramework>
<DockerDefaultTargetOS>Linux</DockerDefaultTargetOS>
<Company>Taranis Software</Company>
<Authors>Irongut</Authors>
Expand Down
2 changes: 1 addition & 1 deletion src/CodeCoverageSummary/Properties/launchSettings.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
},
"Docker": {
"commandName": "Docker",
"commandLineArgs": "/src/coverage.cobertura.xml --format=md --badge=true"
"commandLineArgs": "--files /app/sample.coverage.xml --format=text --badge=true"
}
}
}

0 comments on commit 2e00d30

Please sign in to comment.