workflows: BUILD_CONFIG parameter added

This commit is contained in:
AirryCo
2025-09-21 12:24:50 +08:00
parent 6a4fc5154a
commit d64d6eae44
3 changed files with 44 additions and 15 deletions

View File

@@ -1,14 +1,15 @@
FROM mcr.microsoft.com/dotnet/sdk:9.0-bookworm-slim-arm64v8 AS server-builder
ARG SPT_VERSION
ARG SPT_BUILD_TYPE
ARG SPT_BUILD_CONFIG
RUN apt update && apt install -y git git-lfs wget && \
git clone -b develop --depth=1 https://github.com/sp-tarkov/server-csharp.git /snapshot && \
cd /snapshot && git lfs pull && \
cd Libraries/SPTarkov.Server.Assets/SPT_Data/configs && sed -i "s/\"projectName\": \"SPT\",/\"projectName\": \"AirryCo's SPT Linux\",/g" core.json && \
cd /snapshot/Libraries/SPTarkov.Server.Assets/SPT_Data/images/launcher && rm bg.png && wget https://raw.githubusercontent.com/AirryCo/spt-server-ci/refs/heads/main/custom/bg.png && \
cd /snapshot && \
dotnet publish ./SPTarkov.Server/SPTarkov.Server.csproj -c Release -f net9.0 -r linux-arm64 -p:IncludeNativeLibrariesForSelfExtract=true -p:PublishSingleFile=true --self-contained false -p:SptBuildType=$SPT_BUILD_TYPE -p:SptVersion=$SPT_VERSION -p:SptBuildTime=$( date +%Y%m%d ) -p:SptCommit=$(git rev-parse --short HEAD) -p:IsPublish=true && \
rm SPTarkov.Server/bin/Release/net9.0/linux-arm64/publish/*.pdb && \
dotnet publish ./SPTarkov.Server/SPTarkov.Server.csproj -c $SPT_BUILD_CONFIG -f net9.0 -r linux-arm64 -p:IncludeNativeLibrariesForSelfExtract=true -p:PublishSingleFile=true --self-contained false -p:SptBuildType=$SPT_BUILD_TYPE -p:SptVersion=$SPT_VERSION -p:SptBuildTime=$( date +%Y%m%d ) -p:SptCommit=$(git rev-parse --short HEAD) -p:IsPublish=true && \
rm SPTarkov.Server/bin/$SPT_BUILD_CONFIG/net9.0/linux-arm64/publish/*.pdb && \
rm -rf /var/lib/apt/lists/*
FROM mcr.microsoft.com/dotnet/aspnet:9.0-bookworm-slim-arm64v8