3
0
Fork 0
mirror of https://gitea.com/actions/setup-node.git synced 2024-11-25 11:39:32 +01:00

Fix description about ensuring workflow access to private package (#704)

This commit is contained in:
Muhun Kim 2023-06-16 00:10:28 +09:00 committed by GitHub
parent 869f4dd0c7
commit 698d50532e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -401,11 +401,14 @@ steps:
yarn config set npmScopes.my-org.npmAlwaysAuth true yarn config set npmScopes.my-org.npmAlwaysAuth true
yarn config set npmScopes.my-org.npmAuthToken $NPM_AUTH_TOKEN yarn config set npmScopes.my-org.npmAuthToken $NPM_AUTH_TOKEN
env: env:
NPM_AUTH_TOKEN: ${{ secrets.YARN_TOKEN }} NPM_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Install dependencies - name: Install dependencies
run: yarn install --immutable run: yarn install --immutable
``` ```
NOTE: As per https://github.com/actions/setup-node/issues/49 you cannot use `secrets.GITHUB_TOKEN` to access private GitHub Packages within the same organisation but in a different repository.
To access private GitHub Packages within the same organization, go to "Manage Actions access" in Package settings and set the repositories you want to access.
Please refer to the [Ensuring workflow access to your package - Configuring a package's access control and visibility](https://docs.github.com/en/packages/learn-github-packages/configuring-a-packages-access-control-and-visibility#ensuring-workflow-access-to-your-package) for more details.
### always-auth input ### always-auth input
The always-auth input sets `always-auth=true` in .npmrc file. With this option set [npm](https://docs.npmjs.com/cli/v6/using-npm/config#always-auth)/yarn sends the authentication credentials when making a request to the registries. The always-auth input sets `always-auth=true` in .npmrc file. With this option set [npm](https://docs.npmjs.com/cli/v6/using-npm/config#always-auth)/yarn sends the authentication credentials when making a request to the registries.