From 4986e930deb4a9614633215d165d11ddea3167ad Mon Sep 17 00:00:00 2001 From: irongut Date: Tue, 23 Nov 2021 01:08:46 +0000 Subject: [PATCH 1/6] updated CLI to .Net 6 #23 --- src/CodeCoverageSummary/CodeCoverageSummary.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/CodeCoverageSummary/CodeCoverageSummary.csproj b/src/CodeCoverageSummary/CodeCoverageSummary.csproj index 130f673..c45bb1e 100644 --- a/src/CodeCoverageSummary/CodeCoverageSummary.csproj +++ b/src/CodeCoverageSummary/CodeCoverageSummary.csproj @@ -2,7 +2,7 @@ Exe - net5.0 + net6.0 Linux Taranis Software Irongut From dd5c8d3b75159e291333cb20fa49b7e34c23b18e Mon Sep 17 00:00:00 2001 From: irongut Date: Tue, 23 Nov 2021 20:56:58 +0000 Subject: [PATCH 2/6] updated Dockerfile to .Net 6 #23 --- Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index fc747fc..f663bc3 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM mcr.microsoft.com/dotnet/sdk:5.0 AS build +FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build WORKDIR /src COPY ["src/CodeCoverageSummary/CodeCoverageSummary.csproj", "CodeCoverageSummary/"] RUN dotnet restore CodeCoverageSummary/CodeCoverageSummary.csproj @@ -18,7 +18,7 @@ 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 . From 3a41f0a5ea0f44695e2e12a5b92dc6e9d2df4197 Mon Sep 17 00:00:00 2001 From: irongut Date: Tue, 23 Nov 2021 21:54:11 +0000 Subject: [PATCH 3/6] reduced number of Docker image layers --- Dockerfile | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index f663bc3..1c245f0 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,11 +1,10 @@ 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 " @@ -20,6 +19,6 @@ LABEL com.github.actions.color="purple" 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"] \ No newline at end of file From 3d33fafb373b297802d13dc712a6c09cc9e39b99 Mon Sep 17 00:00:00 2001 From: irongut Date: Wed, 24 Nov 2021 00:24:33 +0000 Subject: [PATCH 4/6] updated Docker launch settings --- src/CodeCoverageSummary/Properties/launchSettings.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/CodeCoverageSummary/Properties/launchSettings.json b/src/CodeCoverageSummary/Properties/launchSettings.json index 736ad24..68bac46 100644 --- a/src/CodeCoverageSummary/Properties/launchSettings.json +++ b/src/CodeCoverageSummary/Properties/launchSettings.json @@ -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" } } } \ No newline at end of file From ea5d3b417b44520f896660b0d1dd6c41543af87b Mon Sep 17 00:00:00 2001 From: irongut Date: Wed, 24 Nov 2021 00:32:25 +0000 Subject: [PATCH 5/6] updated build workflows to .Net 6 #23 --- .github/workflows/ci-build.yml | 2 +- .github/workflows/release-build.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci-build.yml b/.github/workflows/ci-build.yml index 3e53b58..c6994b2 100644 --- a/.github/workflows/ci-build.yml +++ b/.github/workflows/ci-build.yml @@ -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 diff --git a/.github/workflows/release-build.yml b/.github/workflows/release-build.yml index 041ee08..901acd4 100644 --- a/.github/workflows/release-build.yml +++ b/.github/workflows/release-build.yml @@ -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 From c4d4b9a08730bdd8bc54973b9bfa625e36848cf5 Mon Sep 17 00:00:00 2001 From: irongut Date: Wed, 24 Nov 2021 00:34:44 +0000 Subject: [PATCH 6/6] updated build workflows to .Net 6 #23 --- .github/workflows/ci-build.yml | 2 +- .github/workflows/release-build.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci-build.yml b/.github/workflows/ci-build.yml index c6994b2..b1b6a5c 100644 --- a/.github/workflows/ci-build.yml +++ b/.github/workflows/ci-build.yml @@ -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 diff --git a/.github/workflows/release-build.yml b/.github/workflows/release-build.yml index 901acd4..378a345 100644 --- a/.github/workflows/release-build.yml +++ b/.github/workflows/release-build.yml @@ -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