diff --git a/.github/Dockerfile b/.github/Dockerfile index 5c3be6db..96f73216 100644 --- a/.github/Dockerfile +++ b/.github/Dockerfile @@ -7,7 +7,14 @@ RUN apk add git gcc musl-dev COPY . /app/tuic WORKDIR /app/tuic -ARG RUSTFLAGS="-Ctarget-feature=+sse2,+sse3,+avx" + +RUN if [ "$DOCKER_PLATFORM" = "amd64" ]; then \ + echo "Setting RUSTFLAGS for x86_64" && \ + export RUSTFLAGS="-Ctarget-feature=+sse2,+sse3,+avx" ; \ + else \ + export RUSTFLAGS="" ; \ + fi + RUN cargo build --release --config net.git-fetch-with-cli=true --package tuic-server RUN cp ./target/release/tuic-server /usr/bin/tuic-server RUN chmod +x /usr/bin/tuic-server diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1a717fe4..64aee8aa 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -293,7 +293,7 @@ jobs: with: context: . file: .github/Dockerfile - platforms: linux/amd64,linux/arm64 + platforms: linux/amd64,linux/arm64,linux/i386 push: true tags: ghcr.io/${{ steps.get-ownername.outputs.OWNER }}/tuic-server:${{ steps.get-ver.outputs.TAG }}