diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 5cc0db2d6..51b61260a 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -36,7 +36,7 @@ jobs: VERSIONSUFFIX=docker if [[ $GITHUB_REF == refs/tags/* ]]; then VERSION=${GITHUB_REF#refs/tags/} - VERSIONSUFFIX= + VERSIONSUFFIX=none elif [[ $GITHUB_REF == refs/heads/* ]]; then VERSION=nightly VERSIONSUFFIX=docker.${{ github.run_number }} diff --git a/Dockerfile b/Dockerfile index 932addbb6..e8797a7c4 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,7 +4,7 @@ FROM --platform=$BUILDPLATFORM mcr.microsoft.com/dotnet/sdk:5.0 AS build # https://github.com/containerd/containerd/blob/master/platforms/platforms.go#L17 ARG TARGETARCH -ARG VERSIONSUFFIX +ARG VERSIONSUFFIX="docker" WORKDIR /source @@ -31,6 +31,7 @@ RUN case "$TARGETARCH" in \ arm) NETCORE_PLATFORM='linux-arm';; \ *) echo "unsupported architecture"; exit 1 ;; \ esac && \ + [[ $VERSIONSUFFIX = "none" ]] && VERSIONSUFFIX=; \ dotnet publish -c release -o /app -r "$NETCORE_PLATFORM" -p:VersionSuffix="$VERSIONSUFFIX" --no-restore ./src/Impostor.Server/Impostor.Server.csproj # Final image.