diff --git a/.github/workflows/ci-build.yml b/.github/workflows/ci-build.yml index 3e53b58..b1b6a5c 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 @@ -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 041ee08..378a345 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 @@ -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 diff --git a/Dockerfile b/Dockerfile index fc747fc..1c245f0 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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 " @@ -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"] \ No newline at end of file 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 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