mirror of
https://github.com/irongut/CodeCoverageSummary.git
synced 2026-05-17 23:40:13 +02:00
simplified Dockerfile
This commit is contained in:
+7
-10
@@ -1,15 +1,11 @@
|
||||
FROM mcr.microsoft.com/dotnet/runtime:5.0 AS base
|
||||
WORKDIR /app
|
||||
|
||||
FROM mcr.microsoft.com/dotnet/sdk:5.0 AS build
|
||||
WORKDIR /src
|
||||
COPY ["src/CodeCoverageSummary/CodeCoverageSummary.csproj", "CodeCoverageSummary/"]
|
||||
RUN dotnet restore CodeCoverageSummary/CodeCoverageSummary.csproj
|
||||
COPY ["src/", "CodeCoverageSummary/"]
|
||||
RUN dotnet build CodeCoverageSummary/CodeCoverageSummary.csproj -c Release -o /app/build
|
||||
|
||||
FROM build AS publish
|
||||
RUN dotnet publish CodeCoverageSummary/CodeCoverageSummary.csproj -c Release -o /app/publish
|
||||
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
|
||||
|
||||
# Label the container
|
||||
LABEL maintainer="Irongut <murray.dave@outlook.com>"
|
||||
@@ -22,7 +18,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 base AS final
|
||||
FROM mcr.microsoft.com/dotnet/runtime:5.0 AS final
|
||||
WORKDIR /app
|
||||
COPY --from=publish /app/publish .
|
||||
COPY --from=build /app/publish .
|
||||
COPY --from=build src/CodeCoverageSummary/sample.coverage.xml .
|
||||
ENTRYPOINT ["dotnet", "CodeCoverageSummary.dll"]
|
||||
Reference in New Issue
Block a user