feat: add configuration, CI workflow, and Dockerfile updates for Forgejo release sync
Run Forgejo Release Sync / sync (push) Failing after 40s
Run Forgejo Release Sync / sync (push) Failing after 40s
- Introduced `config.toml` to manage repository-specific settings. - Added GitHub Actions workflow for scheduled and manual Forgejo release synchronization. - Updated Dockerfile for Alpine AOT builds, customized Alpine mirrors, and improved dependency management.
This commit is contained in:
1 parent
8db845f27a
commit
d6fd01f642
5 files changed
+97
-15
No files matched your search
+20
-13
@@ -1,21 +1,28 @@
|
||||
FROM mcr.microsoft.com/dotnet/runtime:10.0 AS base
|
||||
USER $APP_UID
|
||||
WORKDIR /app
|
||||
|
||||
FROM mcr.microsoft.com/dotnet/sdk:10.0 AS build
|
||||
FROM mcr.hamdocker.ir/dotnet/sdk:10.0.403-alpine3.24-aot AS build
|
||||
ARG BUILD_CONFIGURATION=Release
|
||||
WORKDIR /src
|
||||
COPY ["ForgejoReleaseSync.csproj", "./"]
|
||||
|
||||
RUN echo "https://mirror.mobinhost.com/alpine/v3.24/main" > /etc/apk/repositories && \
|
||||
echo "https://mirror.mobinhost.com/alpine/v3.24/community" >> /etc/apk/repositories
|
||||
|
||||
RUN apk add --no-cache clang zlib-dev
|
||||
|
||||
RUN dotnet nuget remove source nuget.org && \
|
||||
dotnet nuget add source https://repo.hmirror.ir/nuget --name hmirror
|
||||
|
||||
RUN dotnet restore "ForgejoReleaseSync.csproj"
|
||||
COPY . .
|
||||
WORKDIR "/src/"
|
||||
RUN dotnet build "./ForgejoReleaseSync.csproj" -c $BUILD_CONFIGURATION -o /app/build
|
||||
|
||||
FROM build AS publish
|
||||
ARG BUILD_CONFIGURATION=Release
|
||||
RUN dotnet publish "./ForgejoReleaseSync.csproj" -c $BUILD_CONFIGURATION -o /app/publish /p:UseAppHost=false
|
||||
RUN dotnet publish "ForgejoReleaseSync.csproj" \
|
||||
-r linux-musl-x64 \
|
||||
-c $BUILD_CONFIGURATION \
|
||||
-p:PublishAot=true \
|
||||
-p:StripSymbols=true \
|
||||
-p:InvariantGlobalization=true \
|
||||
-o /app
|
||||
|
||||
FROM base AS final
|
||||
FROM mcr.hamdocker.ir/dotnet/runtime-deps:10.0.14-alpine3.24
|
||||
WORKDIR /app
|
||||
COPY --from=publish /app/publish .
|
||||
ENTRYPOINT ["dotnet", "ForgejoReleaseSync.dll"]
|
||||
COPY --from=build /app .
|
||||
ENTRYPOINT ["/app/ForgejoReleaseSync"]
|
||||
Reference in new issue
Block a user