try go hash
This commit is contained in:
@ -8,16 +8,26 @@ jobs:
|
|||||||
RUNNER_TOOL_CACHE: /toolcache
|
RUNNER_TOOL_CACHE: /toolcache
|
||||||
runs-on: rust-latest
|
runs-on: rust-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Check out repository code
|
- uses: actions/checkout@v4
|
||||||
uses: actions/checkout@v4
|
- uses: actions/setup-go@v3
|
||||||
- name: Cargo target cache
|
|
||||||
uses: actions/cache@v3
|
|
||||||
with:
|
with:
|
||||||
|
go-version: '1.24'
|
||||||
|
- uses: https://gitea.com/actions/go-hashfiles@v0.0.1
|
||||||
|
id: get-hash
|
||||||
|
with:
|
||||||
|
patterns: Cargo.toml
|
||||||
|
- name: Echo hash
|
||||||
|
run: echo ${{ steps.get-hash.outputs.hash }}
|
||||||
|
- name: cache go
|
||||||
|
id: cache-go
|
||||||
|
uses: actions/cache@v3
|
||||||
|
with: # Specify with your cache path
|
||||||
path: |
|
path: |
|
||||||
~/.cargo/registry
|
~/.cargo/registry
|
||||||
~/.cargo/git
|
|
||||||
target
|
target
|
||||||
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
|
key: go_path-${{ steps.hash-go.outputs.hash }}
|
||||||
|
restore-keys: |-
|
||||||
|
go_cache-${{ steps.hash-go.outputs.hash }}
|
||||||
- name: Build project
|
- name: Build project
|
||||||
uses: actions-rs/cargo@v1
|
uses: actions-rs/cargo@v1
|
||||||
with:
|
with:
|
||||||
|
|||||||
Reference in New Issue
Block a user