From 3d18aba8a2794669d484bf960c71aafffc0e9cba Mon Sep 17 00:00:00 2001 From: jackfiled Date: Mon, 6 Nov 2023 14:08:17 +0800 Subject: [PATCH] add: CI --- .gitea/workflows/build.yaml | 14 ++++++++++++++ .idea/.idea.Katheryne/.idea/indexLayout.xml | 4 +++- Frontend/Dockerfile | 4 ++++ 3 files changed, 21 insertions(+), 1 deletion(-) create mode 100644 .gitea/workflows/build.yaml create mode 100644 Frontend/Dockerfile diff --git a/.gitea/workflows/build.yaml b/.gitea/workflows/build.yaml new file mode 100644 index 0000000..f6c44a2 --- /dev/null +++ b/.gitea/workflows/build.yaml @@ -0,0 +1,14 @@ +name: Build Frontend Docker Image +on: [push] +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Check out repository code + uses: https://git.rrricardo.top/actions/checkout@v3 + + - run: dotnet publish ./Frontend/Frontend.csproj -c Release -o publish + + - run: cp ./Frontend/Dockerfile . + + - run: docker build . -t git.rrricardo.top/jackfiled/frontend:latest \ No newline at end of file diff --git a/.idea/.idea.Katheryne/.idea/indexLayout.xml b/.idea/.idea.Katheryne/.idea/indexLayout.xml index 7b08163..6d76e8a 100644 --- a/.idea/.idea.Katheryne/.idea/indexLayout.xml +++ b/.idea/.idea.Katheryne/.idea/indexLayout.xml @@ -1,7 +1,9 @@ - + + .gitea + diff --git a/Frontend/Dockerfile b/Frontend/Dockerfile new file mode 100644 index 0000000..78a6655 --- /dev/null +++ b/Frontend/Dockerfile @@ -0,0 +1,4 @@ +FROM mcr.microsoft.com/dotnet/aspnet:7.0 +WORKDIR /app +COPY ./publish/ . +ENTRYPOINT ["dotnet", "Frontend.dll"] \ No newline at end of file