This commit is contained in:
rustmailer
2026-05-15 10:07:02 +08:00
parent e708dc524b
commit 407d865a9a
3 changed files with 14 additions and 14 deletions
+7 -7
View File
@@ -5,8 +5,8 @@ on:
tags:
- '[0-9]+.[0-9]+.[0-9]+'
env:
BINARY_NAME: bichon
BINARY_CTL: bichonctl
BINARY_NAME: bichon-server
BINARY_CLI: bichon-cli
BINARY_ADMIN: bichon-admin
permissions:
@@ -82,18 +82,18 @@ jobs:
if: matrix.target == 'aarch64-unknown-linux-gnu'
run: |
cargo install cross --force
cross build --release --features vendored-openssl --target=${{ matrix.target }}
cross build --release --target=${{ matrix.target }}
- name: Build Rust backend
if: matrix.target != 'aarch64-unknown-linux-gnu'
run: |
cargo build --release --features vendored-openssl --target=${{ matrix.target }}
cargo build --release --target=${{ matrix.target }}
- name: Strip binary (Linux and macOS)
if: matrix.os != 'windows-latest' && matrix.target != 'aarch64-unknown-linux-gnu'
run: |
strip target/${{ matrix.target }}/release/${{ env.BINARY_NAME }}
strip target/${{ matrix.target }}/release/${{ env.BINARY_CTL }}
strip target/${{ matrix.target }}/release/${{ env.BINARY_CLI }}
strip target/${{ matrix.target }}/release/${{ env.BINARY_ADMIN }}
- name: Pack artifact (Linux/macOS)
@@ -104,7 +104,7 @@ jobs:
BINARY="target/${{ matrix.target }}/release/${{ env.BINARY_NAME }}"
cp README.md LICENSE release/
cp target/${{ matrix.target }}/release/${{ env.BINARY_NAME }} release/
cp target/${{ matrix.target }}/release/${{ env.BINARY_CTL }} release/
cp target/${{ matrix.target }}/release/${{ env.BINARY_CLI }} release/
cp target/${{ matrix.target }}/release/${{ env.BINARY_ADMIN }} release/
tar -czvf "${{ env.BINARY_NAME }}-${{ github.ref_name }}-${{ matrix.target }}.tar.gz" -C release .
mv "${{ env.BINARY_NAME }}-${{ github.ref_name }}-${{ matrix.target }}.tar.gz" release/
@@ -123,7 +123,7 @@ jobs:
mkdir -p release
Copy-Item "target/${{ matrix.target }}/release/${{ env.BINARY_NAME }}.exe" release/
Copy-Item "target/${{ matrix.target }}/release/${{ env.BINARY_CTL }}.exe" release/
Copy-Item "target/${{ matrix.target }}/release/${{ env.BINARY_CLI }}.exe" release/
Copy-Item "target/${{ matrix.target }}/release/${{ env.BINARY_ADMIN }}.exe" release/
Copy-Item -Path README.md -Destination release/
+5 -5
View File
@@ -12,17 +12,17 @@ LABEL description="Dockerized Bichon service"
WORKDIR /opt/bichon
# Copy compiled binary (ensure it's statically linked or compatible with bullseye)
COPY ${TARGETARCH}/bichon /opt/bichon/bichon
COPY ${TARGETARCH}/bichon-server /opt/bichon/bichon-server
COPY ${TARGETARCH}/LICENSE /opt/bichon/
# cli tools
COPY ${TARGETARCH}/bichonctl /usr/local/bin/bichonctl
COPY ${TARGETARCH}/bichon-cli /usr/local/bin/bichon-cli
COPY ${TARGETARCH}/bichon-admin /usr/local/bin/bichon-admin
# Set permissions
RUN chmod +x /opt/bichon/bichon
RUN chmod +x /usr/local/bin/bichonctl
RUN chmod +x /opt/bichon/bichon-server
RUN chmod +x /usr/local/bin/bichon-cli
RUN chmod +x /usr/local/bin/bichon-admin
@@ -40,4 +40,4 @@ WORKDIR /data
HEALTHCHECK --interval=30s --timeout=5s --start-period=5s --retries=3 \
CMD curl -fs http://localhost:15630/api/status || exit 1
CMD ["/opt/bichon/bichon"]
CMD ["/opt/bichon/bichon-server"]
+2 -2
View File
@@ -19,8 +19,8 @@ VERSION=$(sed -n 's/^version = "\(.*\)"/\1/p' ../Cargo.toml)
echo "Step 3: Extracted version: $VERSION"
# Step 4: Copy the compiled RustMailer binary to current directory (docker/)
cp ../target/release/bichon .
echo "Step 4: Copied bichon binary"
cp ../target/release/bichon-server .
echo "Step 4: Copied bichon-server binary"
# Step 5: Build Docker image with version tag
sudo docker build --build-arg CRATE_VERSION=$VERSION -t bichon:$VERSION .