From 032d043c3eb0c9d0fecdc816026715745c69df98 Mon Sep 17 00:00:00 2001 From: Fergus Molloy Date: Fri, 18 Jul 2025 13:35:24 +0100 Subject: [PATCH] go to old cache --- .gitea/workflows/cargo.yaml | 26 +++++++++----------------- 1 file changed, 9 insertions(+), 17 deletions(-) diff --git a/.gitea/workflows/cargo.yaml b/.gitea/workflows/cargo.yaml index 9a1e760..99480e3 100644 --- a/.gitea/workflows/cargo.yaml +++ b/.gitea/workflows/cargo.yaml @@ -8,26 +8,18 @@ jobs: RUNNER_TOOL_CACHE: /toolcache runs-on: rust-latest steps: - - uses: actions/checkout@v4 - - uses: actions/setup-go@v3 + - name: Check out repository code + uses: actions/checkout@v4 + - name: Cargo target cache + uses: actions/cache@v4 with: - go-version: '1.24' - - uses: https://gitea.com/actions/go-hashfiles@v0.0.1 - id: get-hash - with: - patterns: Cargo.toml - - name: Echo hash - run: echo "hash is ${{ steps.get-hash.outputs.hash }}" - - name: cache go - id: cache-go - uses: actions/cache@v3 - with: # Specify with your cache path path: | - ~/.cargo/registry + ~/.cargo target - key: go_path-${{ steps.hash-go.outputs.hash }} - restore-keys: |- - go_cache-${{ steps.hash-go.outputs.hash }} + key: ${{ runner.os }}-cargo-target-${{ hashFiles('**/Cargo.toml') }}-${{ hashFiles('**/Cargo.lock') }} + restore-keys: | + ${{ runner.os }}-cargo-target-${{ hashFiles('**/Cargo.toml') }} + ${{ runner.os }}-cargo-target - name: Build project uses: actions-rs/cargo@v1 with: