ci: cache dependencies.
This commit is contained in:
parent
0d1dfbf589
commit
38dab1df02
@ -5,6 +5,15 @@ jobs:
|
|||||||
build:
|
build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
|
- name: Check out repository code
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: Get Dependencies Index Hash
|
||||||
|
uses: actions/go-hashfiles@v0.0.1
|
||||||
|
id: hash-dependencies-index
|
||||||
|
with:
|
||||||
|
patterns: '**/Cargo.lock'
|
||||||
|
|
||||||
- name: Restore Dependencies
|
- name: Restore Dependencies
|
||||||
id: restore-dependencies
|
id: restore-dependencies
|
||||||
uses: https://github.com/actions/cache@v3
|
uses: https://github.com/actions/cache@v3
|
||||||
@ -15,10 +24,7 @@ jobs:
|
|||||||
~/.cargo/registry/cache/
|
~/.cargo/registry/cache/
|
||||||
~/.cargo/git/db/
|
~/.cargo/git/db/
|
||||||
target/
|
target/
|
||||||
key: ${{ runner.os }}-cargo-${{ hashFiles('~/Cargo.lock') }}
|
key: ${{ runner.os }}-cargo-${{ steps.hash-dependencies-index.outputs.hash }}
|
||||||
|
|
||||||
- name: Check out repository code
|
|
||||||
uses: actions/checkout@v3
|
|
||||||
|
|
||||||
- name: Install Rust
|
- name: Install Rust
|
||||||
uses: https://github.com/actions-rs/toolchain@v1
|
uses: https://github.com/actions-rs/toolchain@v1
|
||||||
@ -89,4 +95,3 @@ jobs:
|
|||||||
push: true
|
push: true
|
||||||
tags: ${{ steps.meta.outputs.tags }}
|
tags: ${{ steps.meta.outputs.tags }}
|
||||||
labels: ${{ steps.meta.outputs.labels }}
|
labels: ${{ steps.meta.outputs.labels }}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user