mirror of
https://forgejo.ellis.link/continuwuation/continuwuity.git
synced 2025-09-10 13:52:49 +02:00
ci: Refactor timelord action to use git-warp-time fallback
Updates the timelord action to fall back to git-warp-time when the cache is completely empty, enabling timestamp restoration even on fresh builds. Simplifies the interface by making inputs optional with sensible defaults and adds Docker integration via buildkit-cache-dance.
This commit is contained in:
parent
5d3e10a048
commit
90baadd032
3 changed files with 62 additions and 34 deletions
|
@ -60,6 +60,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
|
||||
EOF
|
||||
|
||||
# Set up xx (cross-compilation scripts)
|
||||
|
@ -133,6 +134,14 @@ FROM toolchain AS builder
|
|||
# Get source
|
||||
COPY . .
|
||||
|
||||
# Restore timestamps from timelord cache if available
|
||||
RUN if [ -f /root/.cache/timelord/timelord.db ]; then \
|
||||
echo "Restoring timestamps from timelord cache"; \
|
||||
timelord sync --source-dir /app --cache-dir /root/.cache/timelord; \
|
||||
else \
|
||||
echo "No timelord cache found, timestamps will be build time"; \
|
||||
fi
|
||||
|
||||
ARG TARGETPLATFORM
|
||||
|
||||
# Verify environment configuration
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue