diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 691f631..b8ea5d1 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -21,10 +21,13 @@ jobs: toolchain: stable override: true - uses: Swatinem/rust-cache@v1 + - id: Get random cache id + run: echo "CACHE_ID=$((RANDOM))" >> $GITHUB_ENV + shell: bash - uses: pat-s/always-upload-cache@v2.1.3 with: path: results/results.yaml - key: results-${{ hashFiles('Cargo.lock') }}-${{ hashFiles('README.md') }}-${{ github.sha }} + key: results-${{ hashFiles('Cargo.lock') }}-${{ hashFiles('README.md') }}-${{ env.CACHE_ID }} restore-keys: | results-${{ hashFiles('Cargo.lock') }}-${{ hashFiles('README.md') }}- results-${{ hashFiles('Cargo.lock') }}-