ci(build): persist cargo registry via CARGO_HOME on existing volume

The compose mount `./runner-cargo-target:/cache/target` already
persists the target dir. Set CARGO_HOME to a subdir of that mount so
the downloaded-crates index + git cache survive too — otherwise every
build re-fetches every dep. No server-side compose change needed.
This commit is contained in:
nevaforget 2026-04-24 09:08:49 +02:00
parent 39b04d3829
commit 11e8e1355a

View File

@ -16,6 +16,13 @@ jobs:
steps:
- name: Build and publish changed packages
run: |
# Persist cargo registry + git cache across runs by piggy-backing
# on the existing persistent CARGO_TARGET_DIR volume (compose
# mounts ./runner-cargo-target -> /cache/target). Without this,
# every build re-downloads every crate.
export CARGO_HOME="${CARGO_TARGET_DIR:-/cache/target}/cargo-home"
mkdir -p "$CARGO_HOME"
rm -rf repo
git clone http://gitea:3000/nevaforget/moonarch-pkgbuilds.git repo
cd repo