From 1e7cb5c94241bdca93fe6c36416774207598979e Mon Sep 17 00:00:00 2001 From: Ivan Li Date: Sun, 9 Jul 2023 09:28:04 +0000 Subject: [PATCH] build(ci): cache key hash. --- .github/workflows/build-and-deploy-by-ftp.yaml | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build-and-deploy-by-ftp.yaml b/.github/workflows/build-and-deploy-by-ftp.yaml index 2672cdd..f193933 100644 --- a/.github/workflows/build-and-deploy-by-ftp.yaml +++ b/.github/workflows/build-and-deploy-by-ftp.yaml @@ -31,11 +31,22 @@ jobs: run: | echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT + - uses: actions/setup-go@v3 + with: + go-version: '1.20' + + - uses: actions/go-hashfiles@v0.0.1 + id: get-hash + with: + patterns: |- + go.sum + **/pnpm-lock.yaml + - uses: https://github.com/actions/cache@v3 name: Setup pnpm cache with: path: ${{ steps.pnpm-cache.outputs.STORE_PATH }} - key: test_xxxxx + key: ${{ runner.os }}-pnpm-store-${{ steps.get-hash.outputs.hash }} restore-keys: | ${{ runner.os }}-pnpm-store-