Skip to content

Commit

Permalink
Merge pull request #2 from awaescher/doc
Browse files Browse the repository at this point in the history
Update ci.yml
  • Loading branch information
awaescher authored May 19, 2024
2 parents 13cb002 + aebeffb commit 5cee489
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ jobs:
run: dotnet test --no-build --configuration=Release --verbosity normal

- name: Build the Docker image
run: docker build . --file Dockerfile --tag awaescher/maxpower:${{steps.gitversion.outputs.semVer}} --tag awaescher/maxpower:latest --build-arg SEMVERSION=${{steps.gitversion.outputs.semVer}}
run: docker build . --file Dockerfile --tag awaescher/maxpower:${{steps.gitversion.outputs.semVer}} --tag awaescher/maxpower:latest --build-arg SEMVERSION=${{steps.gitversion.outputs.FullSemVer}} --build-arg ASSEMBLYSEMVERSION=${{steps.gitversion.outputs.AssemblySemVer}}

- name: Log in to Docker Hub
uses: docker/login-action@f4ef78c080cd8ba55a85445d5b36e214a81df20a
Expand Down
5 changes: 3 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
FROM mcr.microsoft.com/dotnet/sdk:8.0.101 AS build
WORKDIR /

ARG ASSEMBLYSEMVERSION
ARG SEMVERSION

# copy csproj and restore as distinct layers
Expand All @@ -16,12 +17,12 @@ WORKDIR /
COPY ./MaxPower /app/MaxPower/
COPY ./MaxTalkSharp /app/MaxTalkSharp/
WORKDIR /app/MaxPower/
RUN dotnet publish -c Release -r linux-arm64 -o out -p:PublishSingleFile=true --self-contained true /p:AssemblyVersion=$SEMVERSION /p:Version=$SEMVERSION
RUN dotnet publish -c Release -r linux-arm64 -o out -p:PublishSingleFile=true --self-contained true /p:AssemblyVersion=$ASSEMBLYSEMVERSION /p:Version=$SEMVERSION

# RUNTIME CONTAINER
FROM mcr.microsoft.com/dotnet/aspnet:8.0.2-jammy-arm64v8 AS runtime
EXPOSE 80
WORKDIR /app
COPY --from=build /app/MaxPower/out ./
#RUN rm /app/appsettings.Development.json
ENTRYPOINT ["./MaxPower", ""]
ENTRYPOINT ["./MaxPower", ""]

0 comments on commit 5cee489

Please sign in to comment.