From cbcf4300dffb55ad9b1ed5529ae6bf81ad446408 Mon Sep 17 00:00:00 2001 From: Jade Ellis Date: Thu, 1 May 2025 00:47:03 +0100 Subject: [PATCH] ci: Cache timelord-cli to avoid unnecesary compilation --- .forgejo/workflows/release-image.yml | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/.forgejo/workflows/release-image.yml b/.forgejo/workflows/release-image.yml index de009ad5..69d7d2fd 100644 --- a/.forgejo/workflows/release-image.yml +++ b/.forgejo/workflows/release-image.yml @@ -80,17 +80,29 @@ jobs: run: echo '${{ toJSON(fromJSON(needs.define-variables.outputs.build_matrix)) }}' - name: Echo matrix run: echo '${{ toJSON(matrix) }}' - - name: Checkout repository - uses: actions/checkout@v4 - with: - persist-credentials: false - run: | if ! command -v rustup &> /dev/null ; then curl --proto '=https' --tlsv1.2 --retry 10 --retry-connrefused -fsSL "https://sh.rustup.rs" | sh -s -- --default-toolchain none -y echo "${CARGO_HOME:-$HOME/.cargo}/bin" >> $GITHUB_PATH fi - - uses: https://github.com/cargo-bins/cargo-binstall@main + + - name: Checkout repository + uses: actions/checkout@v4 + with: + persist-credentials: false + + - name: Cache timelord-cli installation + id: cache-timelord-bin + uses: actions/cache@v3 + with: + path: ~/.cargo/bin/timelord + key: timelord-cli-v3.0.1 + - name: Install timelord-cli + uses: https://github.com/cargo-bins/cargo-binstall@main + if: steps.cache-timelord-bin.outputs.cache-hit != 'true' - run: cargo binstall timelord-cli@3.0.1 + if: steps.cache-timelord-bin.outputs.cache-hit != 'true' + - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 - name: Set up QEMU