-
Notifications
You must be signed in to change notification settings - Fork 2
38 lines (34 loc) · 1.06 KB
/
Copy pathchromatic.yml
File metadata and controls
38 lines (34 loc) · 1.06 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
name: Chromatic
on:
push:
branches:
- main
workflow_dispatch:
env:
NODE_OPTIONS: --max-old-space-size=16384
jobs:
install: # Warm up node_modules cache for the following jobs
name: Set up Node.js and install npm dependencies
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/setup-project
with:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
storybook:
name: Chromatic toolset initialization
needs: [install]
runs-on: ubuntu-22.04
environment: dev
steps:
- uses: actions/checkout@v4
- name: Export variables
env:
VARS_CONTEXT: ${{ toJson(vars) }}
run: |
EOF=$(dd if=/dev/urandom bs=15 count=1 status=none | base64)
to_envs() { jq -r "to_entries[] | select(.key|startswith(\"PUBLIC_VAR\")) | \"\(.key)<<$EOF\n\(.value)\n$EOF\n\""; }
echo "$VARS_CONTEXT" | to_envs >> $GITHUB_ENV
- uses: ./.github/actions/chromatic
with:
chromatic-project-token: ${{ secrets.CHROMATIC_PROJECT_TOKEN }}