diff --git a/rust/Earthfile b/rust/Earthfile index 6085119..2287879 100644 --- a/rust/Earthfile +++ b/rust/Earthfile @@ -82,8 +82,9 @@ SET_CACHE_MOUNTS_ENV: ARG target_cache_suffix ARG TARGETPLATFORM ARG EARTHLY_TARGET_NAME #https://docs.earthly.dev/docs/earthfile/builtin-args + ARG EARTHLY_GIT_BRANCH ENV EARTHLY_RUST_CARGO_HOME_CACHE="type=cache,mode=0777,id=$EARTHLY_CACHE_PREFIX#cargo-home,sharing=shared,target=$CARGO_HOME" - ENV EARTHLY_RUST_TARGET_CACHE="type=cache,mode=0777,id=$EARTHLY_CACHE_PREFIX#target#$EARTHLY_TARGET_NAME#$TARGETPLATFORM#$target_cache_suffix,sharing=locked,target=target" + ENV EARTHLY_RUST_TARGET_CACHE="type=cache,mode=0777,id=$EARTHLY_CACHE_PREFIX#target#$EARTHLY_TARGET_NAME#$TARGETPLATFORM#$EARTHLY_GIT_BRANCH#$target_cache_suffix,sharing=locked,target=target" # COPY_OUTPUT copies files out of the target cache into the image layers. # Use this function when you want to SAVE an ARTIFACT from the target folder (mounted cache), always trying to minimize the total size of the copied fileset.