4848 - uses : dtolnay/rust-toolchain@stable
4949 with :
5050 components : clippy
51- - uses : Swatinem/rust-cache@v2
51+
52+ - uses : Swatinem/rust-cache@c19371144df3bb44fab255c43d04cbc2ab54d1c4 # v2.9.1
53+ with :
54+ save-if : ${{ github.ref == 'refs/heads/main' }}
5255
5356 - name : Install macOS dependencies
5457 uses : ./.github/actions/install-macos-deps
@@ -131,9 +134,10 @@ jobs:
131134 with :
132135 persist-credentials : false
133136
134- - uses : Swatinem/rust-cache@v2
137+ - uses : Swatinem/rust-cache@c19371144df3bb44fab255c43d04cbc2ab54d1c4 # v2.9.1
135138 with :
136139 prefix-key : v0-rust-${{ join(matrix.targets, '-') }}
140+ save-if : ${{ github.ref == 'refs/heads/main' }}
137141
138142 - name : Install dependencies
139143 uses : ./.github/actions/install-linux-deps
@@ -216,7 +220,9 @@ jobs:
216220
217221 - uses : dtolnay/rust-toolchain@stable
218222
219- - uses : Swatinem/rust-cache@v2
223+ - uses : Swatinem/rust-cache@c19371144df3bb44fab255c43d04cbc2ab54d1c4 # v2.9.1
224+ with :
225+ save-if : ${{ github.ref == 'refs/heads/main' }}
220226
221227 - uses : actions/setup-python@v6.2.0
222228 with :
@@ -378,7 +384,9 @@ jobs:
378384 toolchain : ${{ env.NIGHTLY_CHANNEL }}
379385 components : miri
380386
381- - uses : Swatinem/rust-cache@v2
387+ - uses : Swatinem/rust-cache@c19371144df3bb44fab255c43d04cbc2ab54d1c4 # v2.9.1
388+ with :
389+ save-if : ${{ github.ref == 'refs/heads/main' }}
382390
383391 - name : Run tests under miri
384392 run : cargo +${{ env.NIGHTLY_CHANNEL }} miri test -p rustpython-vm -- miri_test
@@ -399,7 +407,10 @@ jobs:
399407
400408 - uses : dtolnay/rust-toolchain@stable
401409
402- - uses : Swatinem/rust-cache@v2
410+ - uses : Swatinem/rust-cache@c19371144df3bb44fab255c43d04cbc2ab54d1c4 # v2.9.1
411+ with :
412+ save-if : ${{ github.ref == 'refs/heads/main' }}
413+
403414 - name : install wasm-pack
404415 run : curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
405416 - name : install geckodriver
@@ -467,7 +478,10 @@ jobs:
467478 with :
468479 target : wasm32-wasip1
469480
470- - uses : Swatinem/rust-cache@v2
481+ - uses : Swatinem/rust-cache@c19371144df3bb44fab255c43d04cbc2ab54d1c4 # v2.9.1
482+ with :
483+ save-if : ${{ github.ref == 'refs/heads/main' }}
484+
471485 - name : Setup Wasmer
472486 uses : wasmerio/setup-wasmer@v3
473487
0 commit comments