Skip to content

Commit

Permalink
Update CI process
Browse files Browse the repository at this point in the history
  • Loading branch information
Layoric committed Feb 26, 2021
1 parent bb8d382 commit 6d22a22
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 5 deletions.
6 changes: 1 addition & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,6 @@ jobs:
steps:
- name: checkout
uses: actions/checkout@v2

- name: dotnet publish
run: |
dotnet publish ./VuetifySpaTemplate/ -o publish -c release -r linux-x64

- name: repository name fix
run: echo "image_repository_name=$(echo ${{ github.repository }} | tr '[:upper:]' '[:lower:]')" >> $GITHUB_ENV
Expand All @@ -26,7 +22,7 @@ jobs:
- name: Build and push Docker images
uses: docker/[email protected]
with:
file: VuetifySpaTemplate/Dockerfile
file: Dockerfile
context: .
push: true
tags: ghcr.io/${{ env.image_repository_name }}:${{ github.event.release.tag_name }}
Expand Down
24 changes: 24 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
FROM mcr.microsoft.com/dotnet/sdk:5.0 AS build
WORKDIR /source

RUN curl -sL https://deb.nodesource.com/setup_14.x | bash - \
&& apt-get install -y --no-install-recommends nodejs \
&& echo "node version: $(node --version)" \
&& echo "npm version: $(npm --version)" \
&& rm -rf /var/lib/apt/lists/*

COPY VuetifySpaTemplate/package.json .
COPY VuetifySpaTemplate/npm-shrinkwrap.json .

RUN npm --prefix VuetifySpaTemplate install

COPY . .
RUN dotnet restore

WORKDIR /source/VuetifySpaTemplate
RUN dotnet publish -c release -o /app --no-restore

FROM mcr.microsoft.com/dotnet/aspnet:5.0 AS runtime
WORKDIR /app
COPY --from=build /app ./
ENTRYPOINT ["dotnet", "VuetifySpaTemplate.dll"]

0 comments on commit 6d22a22

Please sign in to comment.