Skip to content

Commit 267c441

Browse files
authored
ci: update checkout and cache actions in rust-build workflow (#105)
1 parent 7e8af12 commit 267c441

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

.github/workflows/rust-build.yml

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -32,26 +32,28 @@ jobs:
3232
runs-on: ubuntu-latest
3333
steps:
3434
- name: Checkout repository
35-
uses: actions/checkout@v4
35+
uses: actions/checkout@v6
3636

3737
- name: Install Rust toolchain
3838
uses: dtolnay/rust-toolchain@master
3939
with:
4040
toolchain: ${{ inputs.rust-version }}
4141
components: clippy, rustfmt
4242

43+
# https://github.com/actions/cache/blob/main/examples.md#rust---cargo
4344
- name: Cache dependencies
4445
if: ${{ inputs.enable-cache }}
45-
uses: actions/cache@v4
46+
uses: actions/cache@v5
4647
with:
4748
path: |
4849
~/.cargo/bin/
49-
~/.cargo/registry
50-
~/.cargo/git
51-
target
52-
key: ${{ runner.os }}-cargo-release-${{ hashFiles('**/Cargo.lock') }}
50+
~/.cargo/registry/index/
51+
~/.cargo/registry/cache/
52+
~/.cargo/git/db/
53+
target/
54+
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
5355
restore-keys: |
54-
${{ runner.os }}-cargo-release-
56+
${{ runner.os }}-cargo-
5557
5658
- name: Check formatting
5759
working-directory: ${{ inputs.working-directory }}

0 commit comments

Comments
 (0)