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 0f69d05 commit 5ae6b5d
Show file tree
Hide file tree
Showing 2 changed files with 14 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 ./ScriptTemplate/ -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: ScriptTemplate/Dockerfile
file: Dockerfile
context: .
push: true
tags: ghcr.io/${{ env.image_repository_name }}:${{ github.event.release.tag_name }}
Expand Down
13 changes: 13 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
FROM mcr.microsoft.com/dotnet/sdk:5.0 AS build
WORKDIR /source

COPY . .
RUN dotnet restore

WORKDIR /source/ScriptTemplate
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", "ScriptTemplate.dll"]

0 comments on commit 5ae6b5d

Please sign in to comment.