From b5c75f96ee1aeeff72af96e81106523cbba668c2 Mon Sep 17 00:00:00 2001 From: Franck Royer Date: Fri, 19 Mar 2021 10:31:26 +1100 Subject: [PATCH] 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. --- .github/workflows/ci.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index bdcae86b2e..8593ffc1ee 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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