pnpm / action-setup

Install pnpm package manager
https://github.com/marketplace/actions/setup-pnpm
MIT License
939 stars 89 forks source link

Double cache retrieval in README #130

Closed falko-apheris closed 4 months ago

falko-apheris commented 5 months ago

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

its-monotype commented 5 months ago

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