11name : Save Cache
2+ description : " Save caches for the development environment."
23
34inputs :
45 target-key :
910 using : " composite"
1011
1112 steps :
13+ - name : Lookup mise State (Tasks) Cache
14+ id : lookup-mise
15+ uses : actions/cache/restore@v5
16+ with :
17+ path : ~/.local/state/mise
18+ key : mise-state-${{ runner.os }}-${{ hashFiles('**/mise.toml') }}-${{ github.sha }}
19+ lookup-only : true
20+
1221 - name : Save mise State (Tasks)
22+ if : ${{ steps.lookup-mise.outputs.cache-hit != 'true' }}
1323 uses : actions/cache/save@v5
1424 with :
1525 path : ~/.local/state/mise
16- key : mise-state-${{ runner.os }}-${{ github.sha }}
26+ key : mise-state-${{ runner.os }}-${{ hashFiles('**/mise.toml') }}-${{ github.sha }}
27+
28+ - name : Lookup rustup Cache
29+ id : lookup-rustup
30+ uses : actions/cache/restore@v5
31+ with :
32+ path : ~/.rustup
33+ key : rustup-${{ runner.os }}-${{ hashFiles('**/rust-toolchain.toml') }}
34+ lookup-only : true
1735
1836 - name : Save rustup Cache
37+ if : ${{ steps.lookup-rustup.outputs.cache-hit != 'true' }}
1938 uses : actions/cache/save@v5
2039 with :
2140 path : ~/.rustup
2241 key : rustup-${{ runner.os }}-${{ hashFiles('**/rust-toolchain.toml') }}
2342
43+ - name : Lookup Cargo Cache
44+ id : lookup-cargo
45+ uses : actions/cache/restore@v5
46+ with :
47+ path : |
48+ ~/.cargo/registry
49+ ~/.cargo/git
50+ ~/.cargo/bin
51+ ~/.cargo/binstall
52+ ~/.cargo/env
53+ key : cargo-${{ runner.os }}-${{ hashFiles('**/Cargo.lock') }}
54+ lookup-only : true
55+
2456 - name : Save Cargo Cache
57+ if : ${{ steps.lookup-cargo.outputs.cache-hit != 'true' }}
2558 uses : actions/cache/save@v5
2659 with :
2760 path : |
3063 ~/.cargo/bin
3164 ~/.cargo/binstall
3265 ~/.cargo/env
33- key : cargo-${{ runner.os }}
66+ key : cargo-${{ runner.os }}-${{ hashFiles('**/Cargo.lock') }}
3467
3568 - name : Save Target Cache
3669 uses : ./.github/actions/cache-save/target
@@ -42,19 +75,38 @@ runs:
4275 run : echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
4376 shell : bash
4477
78+ - name : Lookup pnpm Cache
79+ id : lookup-pnpm
80+ uses : actions/cache/restore@v5
81+ with :
82+ path : ${{ steps.pnpm-store.outputs.STORE_PATH }}
83+ key : pnpm-${{ runner.os }}-${{ hashFiles('**/pnpm-lock.yaml') }}
84+ lookup-only : true
85+
4586 - name : Save pnpm cache
87+ if : ${{ steps.lookup-pnpm.outputs.cache-hit != 'true' }}
4688 uses : actions/cache/save@v5
4789 with :
48- path : |
49- ${{ steps.pnpm-store.outputs.STORE_PATH }}
50- node_modules
90+ path : ${{ steps.pnpm-store.outputs.STORE_PATH }}
5191 key : pnpm-${{ runner.os }}-${{ hashFiles('**/pnpm-lock.yaml') }}
5292
93+ - name : Lookup uv Cache
94+ id : lookup-uv
95+ uses : actions/cache/restore@v5
96+ with :
97+ path : |
98+ ~/.cache/uv
99+ ~/.local/share/uv
100+ .venv
101+ key : uv-${{ runner.os }}-${{ hashFiles('uv.lock') }}
102+ lookup-only : true
103+
53104 - name : Save uv Cache
105+ if : ${{ steps.lookup-uv.outputs.cache-hit != 'true' }}
54106 uses : actions/cache/save@v5
55107 with :
56108 path : |
57109 ~/.cache/uv
58110 ~/.local/share/uv
59111 .venv
60- key : uv-${{ runner.os }}-${{ hashFiles('uv.lock') }}
112+ key : uv-${{ runner.os }}-${{ hashFiles('uv.lock') }}
0 commit comments