use hashFiles
This commit is contained in:
@ -10,27 +10,15 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- name: Check out repository code
|
- name: Check out repository code
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
- uses: actions/setup-go@v3
|
|
||||||
with:
|
|
||||||
go-version: '1.20'
|
|
||||||
|
|
||||||
- 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: Cargo target cache
|
- name: Cargo target cache
|
||||||
uses: actions/cache@v4
|
uses: actions/cache@v4
|
||||||
with:
|
with:
|
||||||
path: |
|
path: |
|
||||||
~/.cargo
|
~/.cargo
|
||||||
target
|
target
|
||||||
key: ${{ runner.os }}-cargo-target-${{ setps.get-hash.outputs.hash }}-${{ setps.get-hash.outputs.hash }}
|
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.toml') }}
|
||||||
restore-keys: |
|
restore-keys: |
|
||||||
${{ runner.os }}-cargo-target-${{ setps.get-hash.outputs.hash }}
|
${{ runner.os }}-cargo-target-${{ hashFiles('**/Cargo.toml') }}
|
||||||
${{ runner.os }}-cargo-target
|
${{ runner.os }}-cargo-target
|
||||||
- name: Build project
|
- name: Build project
|
||||||
uses: actions-rs/cargo@v1
|
uses: actions-rs/cargo@v1
|
||||||
|
|||||||
Reference in New Issue
Block a user