Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/altipla-consulting/setup-private-npm.actions

Setup private NPM configuration in CI environments.
https://github.com/altipla-consulting/setup-private-npm.actions

Last synced: about 1 month ago
JSON representation

Setup private NPM configuration in CI environments.

Awesome Lists containing this project

README

        

# setup-private-npm.actions

Setup private NPM configuration in CI environments.

## Usage

```yaml
name: PR

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

jobs:
ci:
name: CI
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Setup Node
uses: actions/setup-node@v2
with:
node-version: '16.x'

- name: Configure private packages
uses: altipla-consulting/setup-private-npm.actions@main
with:
# Use only the ones you need.
fontawesome-token: ${{ secrets.FONTAWESOME_TOKEN }}
github-token: ${{ secrets.GITHUB_TOKEN }}
npm-token: ${{ secrets.NPM_TOKEN }}
buf-token: ${{ secrets.BUF_TOKEN }}

- name: Cache node modules
id: cache-npm
uses: actions/cache@v3
env:
cache-name: cache-node-modules
with:
path: ~/.npm
key: build-${{ env.cache-name }}-${{ hashFiles('package-lock.json') }}
restore-keys: |
build-${{ env.cache-name }}-
build-

- name: Install deps
run: npm ci

- name: Lint
run: npm run lint
```