Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Does your README.md's cache setup equivalent to actions/setup-node@v3 cache setup #51

Open
TriStarGod opened this issue Jul 20, 2022 · 6 comments

Comments

@TriStarGod
Copy link

I see two cache setups (one here and the other on setup-node) and I'm unsure which one is the latest or if either made a difference.

@riderx
Copy link

riderx commented Sep 28, 2022

same, none seems to works

@janosh
Copy link

janosh commented Oct 17, 2022

I also noticed that cache: pnpm doesn't work.

- name: Set up node
  uses: actions/setup-node@v3
  with:
    cache: pnpm

Looks like this was reported: actions/setup-node#479

@melMass
Copy link
Contributor

melMass commented Oct 18, 2022

The sample from the readme works, there is just a small issue on windows, see #61 or #62 :

- name: Get pnpm store directory
  id: pnpm-cache
    shell: bash
    run: |
      echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT

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

@riderx
Copy link

riderx commented Oct 18, 2022

what nodejs version ?
i'm speaking about 16.
i sis try both way but now i'm sticking to this one:
https://github.com/actions/setup-node

@melMass
Copy link
Contributor

melMass commented Oct 18, 2022

@riderx Using 16 too, you can check my full sample that just worked here:

https://github.com/mtb-tools/vscode-mono-workspace/actions/runs/3272609632/workflow

@mcmxcdev
Copy link

I was wondering the same thing, we have a setup like:

- uses: actions/setup-node@v3
  with:
    node-version-file: "package.json"
    cache: "pnpm"

And I am unsure if caching the installation works properly or not between runs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants