action-setup icon indicating copy to clipboard operation
action-setup copied to clipboard

Double cache retrieval in README

Open falko-apheris opened this issue 1 year ago • 1 comments

In the readme I see under "Use cache to reduce installation time"

- name: Install Node.js
        uses: actions/setup-node@v4
        with:
          node-version: 20
          cache: 'pnpm'

Which is caching pnpm install artifacts and restoring them again. But just below there is

- uses: actions/cache@v4
        name: Setup pnpm cache
        with:
          path: ${{ env.STORE_PATH }}
          key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
          restore-keys: |
            ${{ runner.os }}-pnpm-store-

This seems like a duplication. I obsevered that the output of the ci pipleline indicates that both actions are writing to the same directory

falko-apheris avatar Jun 19 '24 09:06 falko-apheris

Just noticed the same, after action runs it left two cache duplicates. Manual cache should be removed in favour of setup-node cache

its-monotype avatar Jun 20 '24 22:06 its-monotype