pnpm / action-setup

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

Double cache retrieval in README #130

Closed falko-apheris closed 1 month ago

falko-apheris commented 2 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 2 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