Open chlbri opened 1 year ago
You can try this https://github.com/pnpm/pnpm/issues/3141#issuecomment-1305563972
I copy here the solution adapted
- name: Set token config
run: |
echo "//npm.pkg.github.com/:_authToken=${secrets.NPM_TOKEN}" > .npmrc
echo "@yourScope=https://npm.pkg.github.com/" >> .npmrc
echo "_auth=${secrets.NPM_TOKEN}" >> .npmrc
echo "always-auth=true" >> .npmrc
env:
secrets.NPM_TOKEN: ${{secrets.NPM_TOKEN}}
- name: Install
run: pnpm install
Keep on mind that pnpm is able to read from .npmrc
so this should works fine. If you have troubles you can always increase the logging to see more in detail what is returning the registry.
@juanpicado that looks like what you'd use to access a private NPM package, not a private GitHub repo.
Apologize for late response.
Does this work? https://pnpm.io/npmrc#url_authtoken
I have a personnel token that helps me to read packages create by my organization.
How can I integrate it as env variable to an action.
I try to access it by secrets:
But it's not working.
Can you help me ?