mirror of
https://github.com/tgstation/tgstation-server.git
synced 2026-08-27 07:04:57 +01:00
Fix docker build
This commit is contained in:
@@ -424,6 +424,8 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
needs: start-ci-run-gate
|
||||
if: (!(cancelled() || failure()) && needs.start-ci-run-gate.result == 'success')
|
||||
env:
|
||||
TGS_TELEMETRY_KEY_FILE: tgs_telemetry_key.txt
|
||||
steps:
|
||||
- name: Checkout (Branch)
|
||||
uses: actions/checkout@v4
|
||||
@@ -435,8 +437,16 @@ jobs:
|
||||
with:
|
||||
ref: "refs/pull/${{ github.event.number }}/merge"
|
||||
|
||||
- name: Setup Telemetry Key File
|
||||
shell: bash
|
||||
run: echo "${{ secrets.TGS_TELEMETRY_KEY }}" > ${{ env.TGS_TELEMETRY_KEY_FILE }}
|
||||
|
||||
- name: Build Docker Image
|
||||
run: docker build . -f build/Dockerfile
|
||||
run: docker build . -f build/Dockerfile --build-arg TGS_TELEMETRY_KEY_FILE=${{ env.TGS_TELEMETRY_KEY_FILE }}
|
||||
|
||||
- name: Delete Telemetry Key File
|
||||
if: always()
|
||||
run: rm ${{ env.TGS_TELEMETRY_KEY_FILE }}
|
||||
|
||||
linux-unit-tests:
|
||||
name: Linux Tests
|
||||
|
||||
+8
-2
@@ -1,5 +1,8 @@
|
||||
FROM mcr.microsoft.com/dotnet/sdk:8.0-bookworm-slim AS build
|
||||
|
||||
# Set in CI
|
||||
ARG TGS_TELEMETRY_KEY_FILE=
|
||||
|
||||
# install node and npm
|
||||
# replace shell with bash so we can source files
|
||||
RUN curl --silent -o- https://raw.githubusercontent.com/creationix/nvm/v0.39.1/install.sh | sh
|
||||
@@ -17,7 +20,8 @@ RUN . $NVM_DIR/nvm.sh \
|
||||
&& apt-get install -y \
|
||||
dos2unix \
|
||||
libgdiplus \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
&& rm -rf /var/lib/apt/lists/* \
|
||||
&& corepack enable
|
||||
|
||||
# Build web control panel
|
||||
WORKDIR /repo/build
|
||||
@@ -45,7 +49,9 @@ RUN dotnet publish -c Release -o /app \
|
||||
&& build/RemoveUnsupportedRuntimes.sh /app
|
||||
|
||||
WORKDIR /repo/src/Tgstation.Server.Host
|
||||
RUN dotnet publish -c Release -o /app/lib/Default \
|
||||
|
||||
RUN export TGS_TELEMETRY_KEY_FILE="${TGS_TELEMETRY_KEY_FILE}" \
|
||||
&& dotnet publish -c Release -o /app/lib/Default \
|
||||
&& cd ../.. \
|
||||
&& build/RemoveUnsupportedRuntimes.sh /app/lib/Default \
|
||||
&& mv /app/lib/Default/appsettings* /app
|
||||
|
||||
@@ -60,6 +60,7 @@
|
||||
</Target>
|
||||
|
||||
<Target Condition="'$(TGS_TELEMETRY_KEY_FILE)' != ''" Name="ApplyTelemetryAppSerializedKey" BeforeTargets="CoreCompile">
|
||||
<Error Condition="!Exists('$(TGS_TELEMETRY_KEY_FILE)')" Text="TGS_TELEMETRY_KEY_FILE set but does not exist!" />
|
||||
<ReadLinesFromFile
|
||||
File="$(TGS_TELEMETRY_KEY_FILE)" >
|
||||
<Output
|
||||
|
||||
Reference in New Issue
Block a user