Skip to content

schie/create-npmrc-action

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Create .npmrc Action

This action creates an .npmrc file at the root of your repository to authenticate with private npm registries.

Inputs

registries

Required A multi-line string containing your registry URLs and their corresponding auth tokens. Each registry should be defined on two lines: the first line is the registry URL, and the second line is the authentication token for that registry.

Example usage

This action can be used as follows within a workflow:

steps:
  - name: Checkout
    uses: actions/checkout@v2

  - name: Create .npmrc
    uses: schie/create-npmrc-action@main
    with:
      registries: |
        registry=https://your-private-registry1/
        //your-private-registry1/:_authToken=${{ secrets.NPM_AUTH_TOKEN1 }}
        registry=https://your-private-registry2/
        //your-private-registry2/:_authToken=${{ secrets.NPM_AUTH_TOKEN2 }}

  - name: SAM Build
    run: sam build

In this example, https://your-private-registry1/ and https://your-private-registry2/ with your actual private NPM registry URLs. The secrets NPM_AUTH_TOKEN1 and NPM_AUTH_TOKEN2 should be set in your repository's settings.

License

This project is licensed under the terms of the MIT license.

About

Creates an .npmrc file for npm

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published