Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update ci.yml #2

Merged
merged 3 commits into from
May 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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", ""]
Loading