diff --git a/.github/workflows/ci-image.yml b/.github/workflows/ci-image.yml index 40a9176..14b4778 100644 --- a/.github/workflows/ci-image.yml +++ b/.github/workflows/ci-image.yml @@ -25,11 +25,10 @@ jobs: - name: Build and Push uses: docker/build-push-action@v3 - env: - CARGO_INCREMENTAL: 0 with: context: . platforms: linux/amd64 push: false build-args: | VERSION=latest + CARGO_INCREMENTAL=0 \ No newline at end of file diff --git a/.github/workflows/ghcr-image.yml b/.github/workflows/ghcr-image.yml index 33cc3b0..92d05d3 100644 --- a/.github/workflows/ghcr-image.yml +++ b/.github/workflows/ghcr-image.yml @@ -37,8 +37,6 @@ jobs: - name: Build and Push uses: docker/build-push-action@v3 - env: - CARGO_INCREMENTAL: 0 with: context: . file: ./prod/Dockerfile @@ -46,6 +44,7 @@ jobs: push: true build-args: | VERSION=${{ github.ref_name }} + CARGO_INCREMENTAL=0 tags: | ghcr.io/${{ env.REPOSITORY_PATH }}:v${{ github.ref_name }} ghcr.io/${{ env.REPOSITORY_PATH }}:${{ env.REPOSITORY_SHA }} diff --git a/Dockerfile b/Dockerfile index ee43e93..1491053 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,6 @@ FROM ghcr.io/xmtp/rust:latest +ARG CARGO_INCREMENTAL + USER xmtp RUN sudo apt update && sudo apt install -y pkg-config openssl libssl-dev @@ -10,6 +12,7 @@ COPY --chown=xmtp:xmtp . . ENV PATH=~xmtp/.cargo/bin:$PATH ENV USER=xmtp +ENV CARGO_INCREMENTAL=${CARGO_INCREMENTAL:-1} RUN cargo check RUN cargo fmt --check RUN cargo clippy --all-features --no-deps -- -D warnings