Use ref HEAD to identify cache

The .gitsubmodules does not change when a submodule is updated.
The cache should be updated whenever nim-waku is updated.
This commit is contained in:
Franck Royer 2021-03-19 10:31:26 +11:00
parent 1797bde72d
commit b5c75f96ee
No known key found for this signature in database
GPG Key ID: A82ED75A8DFC50A4
1 changed files with 6 additions and 2 deletions

View File

@ -14,14 +14,18 @@ jobs:
- name: Checkout code
uses: actions/checkout@v2
- name: Get nim-waku HEAD
id: nim-waku-head
shell: bash
run: echo "::set-output name=ref::$(git rev-parse HEAD)"
- name: Cache nim-waku binary
uses: actions/cache@v2
with:
path: |
./nim-waku/build/wakunode2
./nim-waku/vendor/rln/target/debug
# The nim-waku version is set by the .gitmodules file as it is a submodule
key: nim-waku-build-v2-${{ hashFiles('.gitmodules') }}
key: nim-waku-build-v2-${{ steps.nim-waku-head.outputs.ref }}
- name: Install bufbuild
uses: mu-io/setup-buf@v1beta