add: webhook

This commit is contained in:
h z
2025-03-10 09:39:59 +00:00
parent 22e415bce8
commit ec7ef39128
6 changed files with 122 additions and 33 deletions

23
Dockerfile Normal file
View File

@@ -0,0 +1,23 @@
FROM mcr.microsoft.com/dotnet/aspnet:9.0 AS base
USER $APP_UID
WORKDIR /app
EXPOSE 8080
FROM mcr.microsoft.com/dotnet/sdk:9.0 AS build
ARG BUILD_CONFIGURATION=Release
WORKDIR /src
COPY ["Alchegos.Gitea.Webhook/Alchegos.Gitea.Webhook.csproj", "Alchegos.Gitea.Webhook/"]
RUN dotnet restore "Alchegos.Gitea.Webhook/Alchegos.Gitea.Webhook.csproj"
COPY . .
WORKDIR "/src/Alchegos.Gitea.Webhook"
RUN dotnet build "Alchegos.Gitea.Webhook.csproj" -c $BUILD_CONFIGURATION -o /app/build
FROM build AS publish
ARG BUILD_CONFIGURATION=Release
RUN dotnet publish "Alchegos.Gitea.Webhook.csproj" -c $BUILD_CONFIGURATION -o /app/publish /p:UseAppHost=false
FROM base AS final
WORKDIR /app
COPY --from=publish /app/publish .
ENTRYPOINT ["dotnet", "Alchegos.Gitea.Webhook.dll"]