From d935c181b0f5d4c6dccf9c018e51891060bacbf0 Mon Sep 17 00:00:00 2001 From: seepine Date: Sun, 21 Apr 2024 13:52:13 +0800 Subject: [PATCH] fix: add node_modules path cache --- action.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/action.yml b/action.yml index 7305202..ac4ba47 100644 --- a/action.yml +++ b/action.yml @@ -72,6 +72,14 @@ runs: restore-keys: | ${{ runner.os }}-pnpm-store-cache-${{ steps.cache-rotation.outputs.YEAR_MONTH }}- + - uses: actions/cache@v3 + name: Setup pnpm node_modules cache + with: + path: node_modules + key: ${{ runner.os }}-pnpm-node_modules-store-cache-${{ steps.cache-rotation.outputs.YEAR_MONTH }}-${{ steps.get-hash.outputs.hash }} + restore-keys: | + ${{ runner.os }}-pnpm-node_modules-store-cache-${{ steps.cache-rotation.outputs.YEAR_MONTH }}- + # Prevent store to grow over time (not needed with yarn) # Note: not perfect as it prune too much in monorepos so the idea # is to use cache-rotation as above. In the future this might work better.