https://github.com/get-bridge/npm-login
https://github.com/get-bridge/npm-login
actions github-actions
Last synced: 11 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/get-bridge/npm-login
- Owner: get-bridge
- Created: 2021-01-27T21:48:31.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2023-01-05T16:11:43.000Z (over 3 years ago)
- Last Synced: 2023-03-04T04:29:25.332Z (over 3 years ago)
- Topics: actions, github-actions
- Language: Shell
- Homepage: https://github.com/instructure-bridge/npm-login
- Size: 14.6 KB
- Stars: 0
- Watchers: 6
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# npm-login


**Please note: This action is deprecated and should no longer be used. Please, migrate your workflows to the [actions/setup-node](https://github.com/actions/setup-node) action. To authenticate with `actions/setup-node` use the following general approach which has been adapted from the official [documentation](https://github.com/actions/setup-node/blob/270253e841af726300e85d718a5f606959b2903c/docs/advanced-usage.md#use-private-packages):**
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
registry-url: http://npm.pkg.github.com
# Skip post-install scripts here, as a malicious script could steal NODE_AUTH_TOKEN.
- run: npm install --ignore-scripts
env:
NODE_AUTH_TOKEN: ${{ secrets.YOUR_SEKRET_TOKEN_HERE }}
# `npm rebuild` will run all those post-install scripts for us.
- run: npm rebuild && npm run prepare --if-present
The `npm-login` action will setup the local npm configuration to be
able to connect to a specific scope.
## Usage
Typical usage of this action looks like this:
- uses: get-bridge/npm-login@v1
with:
email: ${{ secrets.NPM_EMAIL }}
password: ${{ secrets.NPM_PASSWORD }}
registry: //some-registry/
scope: some-scope
username: ${{ secrets.SCOPE }}
## Customizing
### inputs
Following inputs can be used as `step.with` keys or via the corresponding environment variable. The `steps.with` values will take precidence over equivalent environment variables.
| Name | env var | Required | Default | Type | Description |
|-------------|----------------------|-----------|----------|---------|-------------------------------------|
| `email` | `NPM_LOGIN_EMAIL` | true | | String | Email associated with the username. |
| `password` | `NPM_LOGIN_PASSWORD` | true | | String | Password for authentication. |
| `protocol` | | false | `https` | String | Set the protocol (e.g. `http`,`https`) |
| `registry` | `NPM_LOGIN_REGISTRY` | true | | String | Registry to use for the desired scope. Must leave off preceeding protocol and include trailing slash like `//example.com/` |
| `scope` | `NPM_LOGIN_SCOPE ` | true | | String | The desired scope. Leave off the preceeding `@`. (e.g. `myscope`) |
| `username` | `NPM_LOGIN_USERNAME` | true | | String | Username for authentication. |