13 lines
655 B
Bash
Executable File
13 lines
655 B
Bash
Executable File
#!/usr/bin/env bash
|
|
# Requires qemu-user-static
|
|
# docker run --privileged --rm tonistiigi/binfmt --install arm64
|
|
# docker buildx create --use --name multi-arch-builder
|
|
REPO_URL="https://gitea.sesh.jetzt/yen/cph_open"
|
|
|
|
mkdir arm64
|
|
ssh root@yenting.party -t "if [ -d /opt/cph_open ]; then cd /opt/cph_open/; else cd /opt/ && git clone $REPO_URL && cd cph_open; fi; git fetch --all && git reset --hard origin/main && git switch main && cargo build --release --bin cph_open"
|
|
scp root@yenting.party:/opt/cph_open/target/release/cph_open arm64/cph_open
|
|
docker buildx build --platform linux/arm64 -t yen3k/cph_open --push --file Dockerfile-arm64 .
|
|
|
|
rm -r arm64
|