From e4713d8da728a1b86c6d7be92a389f7605b707a0 Mon Sep 17 00:00:00 2001 From: "Christopher L. Crutchfield" Date: Sat, 30 Nov 2024 16:13:31 -0800 Subject: [PATCH] fix: run the container and mount the repo --- .github/workflows/Dockerfile.build | 7 ++++--- .github/workflows/rust.yml | 6 +++++- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/.github/workflows/Dockerfile.build b/.github/workflows/Dockerfile.build index b308fe7..8f72ab5 100644 --- a/.github/workflows/Dockerfile.build +++ b/.github/workflows/Dockerfile.build @@ -8,6 +8,7 @@ RUN apt-get update && \ RUN curl https://sh.rustup.rs -sSf | bash -s -- -y -RUN . $HOME/.cargo/env && \ - cargo test --verbose && \ - cargo build --verbose --release \ No newline at end of file +RUN mkdir -p /workspace +WORKDIR /workspace + +CMD ["/bin/bash", "-c", ". $HOME/.cargo/env && cargo test --verbose && cargo build --verbose --release"] \ No newline at end of file diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 61d5354..d931f2e 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -21,12 +21,16 @@ jobs: uses: docker/setup-qemu-action@v3 - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 - - name: Build and push + - name: Build Container uses: docker/build-push-action@v4 with: context: . platforms: linux/amd64,linux/arm64 + tags: builder file: .github/workflows/Dockerfile.build + - name: Build Rust + run: | + docker run --rm -v .:/workspace --platform=linux/amd64 builder - name: Archive Linux x86_64 Results uses: actions/upload-artifact@v4 with: