mirror of
https://github.com/therealaleph/MasterHttpRelayVPN-RUST.git
synced 2026-05-18 05:44:35 +03:00
ci: drop --user on musl docker build (caused /root/.cargo permission denied)
The messense/rust-musl-cross images expect to run as root so cargo can write to /root/.cargo. Overriding the container user to match the host UID broke cargo's registry cache with 'Permission denied' before a single file compiled. Drop the flag and chown the target/ tree after the build instead.
This commit is contained in:
@@ -96,16 +96,18 @@ jobs:
|
||||
- name: Build CLI (musl via docker)
|
||||
if: matrix.target == 'x86_64-unknown-linux-musl'
|
||||
run: |
|
||||
docker run --rm --user "$(id -u):$(id -g)" -v "$PWD":/src -w /src \
|
||||
docker run --rm -v "$PWD":/src -w /src \
|
||||
messense/rust-musl-cross:x86_64-musl \
|
||||
cargo build --release --target x86_64-unknown-linux-musl --bin mhrv-rs
|
||||
sudo chown -R "$(id -u):$(id -g)" target
|
||||
|
||||
- name: Build CLI (musl via docker, arm64)
|
||||
if: matrix.target == 'aarch64-unknown-linux-musl'
|
||||
run: |
|
||||
docker run --rm --user "$(id -u):$(id -g)" -v "$PWD":/src -w /src \
|
||||
docker run --rm -v "$PWD":/src -w /src \
|
||||
messense/rust-musl-cross:aarch64-musl \
|
||||
cargo build --release --target aarch64-unknown-linux-musl --bin mhrv-rs
|
||||
sudo chown -R "$(id -u):$(id -g)" target
|
||||
|
||||
# UI build: we try to build the UI binary on every platform. If it fails
|
||||
# on cross-compile for linux-arm64 (missing arm64 system libs cross),
|
||||
|
||||
Reference in New Issue
Block a user