Skip to content

Latest commit

 

History

History
75 lines (55 loc) · 2.01 KB

frontend_npm_pr.md

File metadata and controls

75 lines (55 loc) · 2.01 KB

Default flow for an NPM package when a PR is opened

This is the default workflow that is run when a PR is opened for an npm package. It is meant to test the quality and safety of the code being committed.

Inputs

This action takes the following inputs:

Name Type Default Required Description
fallback_runner String False False If true will leverage ubuntu-latest, otherwise will fall back to the J1 in-house runner
use_validate Boolean True False Run validation, in most case we want this
use_chromatic Boolean False False Run VRT Storybook tests with chromatic

Secrets

This action takes the following secrets:

Name Required Description
NPM_TOKEN True A J1 npm.com Publish token
CHROMATIC_PROJECT_TOKEN False The Chromatic API token

Example Usage

Default Flow

Usage

jobs:
  pr:
    uses: jupiterone/.github/.github/workflows/frontend_npm_pr.yml@v#
    secrets:
      NPM_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}

Diagram

graph LR;
    A[start flow];
    B[validate];

    A --> B;
Loading

With Chromatic

Usage

jobs:
  pr:
    uses: jupiterone/.github/.github/workflows/frontend_npm_pr.yml@v#
    with:
      use_chromatic: true
    secrets:
      NPM_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
      CHROMATIC_PROJECT_TOKEN: ${{ secrets.CHROMATIC_PROJECT_TOKEN }}

Diagram

graph LR;
    A[start flow];
    B[validate];
    C[chromatic_upload];

    A --> B;
    A --> C;
Loading