Skip to content

Commit 5ae6b5d

Browse files
committed
Update CI process
1 parent 0f69d05 commit 5ae6b5d

File tree

2 files changed

+14
-5
lines changed

2 files changed

+14
-5
lines changed

.github/workflows/release.yml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,6 @@ jobs:
88
steps:
99
- name: checkout
1010
uses: actions/checkout@v2
11-
12-
- name: dotnet publish
13-
run: |
14-
dotnet publish ./ScriptTemplate/ -o publish -c release -r linux-x64
1511

1612
- name: repository name fix
1713
run: echo "image_repository_name=$(echo ${{ github.repository }} | tr '[:upper:]' '[:lower:]')" >> $GITHUB_ENV
@@ -26,7 +22,7 @@ jobs:
2622
- name: Build and push Docker images
2723
uses: docker/build-push-action@v2.2.2
2824
with:
29-
file: ScriptTemplate/Dockerfile
25+
file: Dockerfile
3026
context: .
3127
push: true
3228
tags: ghcr.io/${{ env.image_repository_name }}:${{ github.event.release.tag_name }}

Dockerfile

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
FROM mcr.microsoft.com/dotnet/sdk:5.0 AS build
2+
WORKDIR /source
3+
4+
COPY . .
5+
RUN dotnet restore
6+
7+
WORKDIR /source/ScriptTemplate
8+
RUN dotnet publish -c release -o /app --no-restore
9+
10+
FROM mcr.microsoft.com/dotnet/aspnet:5.0 AS runtime
11+
WORKDIR /app
12+
COPY --from=build /app ./
13+
ENTRYPOINT ["dotnet", "ScriptTemplate.dll"]

0 commit comments

Comments
 (0)