Skip to content

Commit

Permalink
build: another attempt
Browse files Browse the repository at this point in the history
  • Loading branch information
Thundernerd committed Jan 1, 2024
1 parent dbc02bb commit 2fc1b6a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/publish-backend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
- name: Build and push
uses: docker/build-push-action@v4
with:
context: ./src
file: ./Mangarr.Backend/Dockerfile
context: .
file: ./src/Mangarr.Backend/Dockerfile
push: true
tags: ${{ secrets.DOCKERHUB_USERNAME }}/mangarr.backend:latest
7 changes: 3 additions & 4 deletions src/Mangarr.Backend/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,16 @@ EXPOSE 80
EXPOSE 443

FROM mcr.microsoft.com/dotnet/sdk:7.0 AS build
ARG BUILD_CONFIGURATION=Release
WORKDIR /src
COPY . ./
COPY . .
RUN dotnet restore "Mangarr.Backend/Mangarr.Backend.csproj"
COPY . .
WORKDIR "/src/Mangarr.Backend"
RUN dotnet build "Mangarr.Backend.csproj" -c $BUILD_CONFIGURATION -o /app/build
RUN dotnet build "Mangarr.Backend.csproj" -c Release -o /app/build

FROM build AS publish
ARG BUILD_CONFIGURATION=Release
RUN dotnet publish "Mangarr.Backend.csproj" -c $BUILD_CONFIGURATION -o /app/publish /p:UseAppHost=false
RUN dotnet publish "Mangarr.Backend.csproj" -c Release -o /app/publish /p:UseAppHost=false

FROM base AS final
WORKDIR /app
Expand Down

0 comments on commit 2fc1b6a

Please sign in to comment.