ci: Make timelord docker work locally

This commit is contained in:
Jade Ellis 2025-09-10 16:40:55 +01:00
commit a81546374d
No known key found for this signature in database
GPG key ID: 8705A2A3EBF77BD2
2 changed files with 8 additions and 19 deletions

View file

@ -53,6 +53,8 @@ ENV BINSTALL_VERSION=1.13.0
ENV CARGO_SBOM_VERSION=0.9.1
# renovate: datasource=crate depName=lddtree
ENV LDDTREE_VERSION=0.3.7
# renovate: datasource=crate depName=timelord-cli
ENV TIMELORD_VERSION=3.0.1
# Install unpackaged tools
RUN <<EOF
@ -60,7 +62,7 @@ RUN <<EOF
curl --retry 5 -L --proto '=https' --tlsv1.2 -sSf https://raw.githubusercontent.com/cargo-bins/cargo-binstall/main/install-from-binstall-release.sh | bash
cargo binstall --no-confirm cargo-sbom --version $CARGO_SBOM_VERSION
cargo binstall --no-confirm lddtree --version $LDDTREE_VERSION
cargo binstall --no-confirm timelord-cli@3.0.1
cargo binstall --no-confirm timelord-cli --version $TIMELORD_VERSION
EOF
# Set up xx (cross-compilation scripts)
@ -136,12 +138,9 @@ FROM toolchain AS builder
COPY . .
# Restore timestamps from timelord cache if available
RUN if [ -f /app/timelord/timelord.db ]; then \
echo "Restoring timestamps from timelord cache"; \
timelord sync --source-dir /app --cache-dir /app/timelord; \
else \
echo "No timelord cache found, timestamps will be build time"; \
fi
RUN --mount=type=cache,target=/timelord/ \
echo "Restoring timestamps from timelord cache"; \
timelord sync --source-dir /app --cache-dir /timelord;
ARG TARGETPLATFORM