diff --git a/.gitea/workflows/build-and-publish.yaml b/.gitea/workflows/build-and-publish.yaml index 1db2cb7..8674c33 100644 --- a/.gitea/workflows/build-and-publish.yaml +++ b/.gitea/workflows/build-and-publish.yaml @@ -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