File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 99 - name : checkout
1010 uses : actions/checkout@v2
1111
12- - name : dotnet publish
13- run : |
14- rm -rf publish
15- dotnet publish ./RazorTemplate/ -o publish -c release -r linux-x64
16- cd publish && ls -l && cd ..
17-
1812 - name : repository name fix
1913 run : echo "image_repository_name=$(echo ${{ github.repository }} | tr '[:upper:]' '[:lower:]')" >> $GITHUB_ENV
2014
2822 - name : Build and push Docker images
2923 uses : docker/build-push-action@v2.2.2
3024 with :
31- file : RazorTemplate/ Dockerfile
25+ file : Dockerfile
3226 context : .
3327 push : true
3428 tags : ghcr.io/${{ env.image_repository_name }}:${{ github.event.release.tag_name }}
Original file line number Diff line number Diff line change 1+ FROM mcr.microsoft.com/dotnet/sdk:5.0 AS build
2+ WORKDIR /source
3+
4+ ENV NODE_VERSION=12.6.0
5+ RUN apt install -y curl
6+ RUN curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.34.0/install.sh | bash
7+ ENV NVM_DIR=/root/.nvm
8+ RUN . "$NVM_DIR/nvm.sh" && nvm install ${NODE_VERSION}
9+ RUN . "$NVM_DIR/nvm.sh" && nvm use v${NODE_VERSION}
10+ RUN . "$NVM_DIR/nvm.sh" && nvm alias default v${NODE_VERSION}
11+ ENV PATH="/root/.nvm/versions/node/v${NODE_VERSION}/bin/:${PATH}"
12+ RUN node --version
13+ RUN npm --version
14+ RUN npm install -g typescript
15+ COPY . .
16+ RUN dotnet restore
17+
18+ WORKDIR /source/RazorTemplate
19+ RUN dotnet publish -c release -o /app --no-restore
20+
21+
22+ FROM mcr.microsoft.com/dotnet/aspnet:5.0 AS runtime
23+ WORKDIR /app
24+ COPY --from=build /app ./
25+ ENTRYPOINT ["dotnet" , "RazorTemplate.dll" ]
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments