-
Notifications
You must be signed in to change notification settings - Fork 5
40 lines (38 loc) · 1.48 KB
/
reg.yml
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
39
40
name: Regsuit
on: [push]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Use Node.js v14
uses: actions/setup-node@v2
with:
node-version: '14.x'
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- uses: actions/cache@v2
id: yarn-cache
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Install modules
run: yarn
- run: yarn storybook:build
- run: yarn screenshot
- name: workaround for detached HEAD
run: git checkout ${GITHUB_REF#refs/heads/} || git checkout -b ${GITHUB_REF#refs/heads/} && git pull
- name: prepare gcp key
id: prepare_gcp_key
run: GOOGLE_APPLICATION_CREDENTIALS=$(mktemp) && echo $GOOGLE_APPLICATION_CREDENTIALS_BASE64 | base64 -d > $GOOGLE_APPLICATION_CREDENTIALS && echo "::set-output name=GOOGLE_APPLICATION_CREDENTIALS::$GOOGLE_APPLICATION_CREDENTIALS"
env:
GOOGLE_APPLICATION_CREDENTIALS_BASE64: ${{secrets.GOOGLE_APPLICATION_CREDENTIALS_BASE64}}
- name: run reg-suit
run: yarn reg-suit run
env:
GOOGLE_APPLICATION_CREDENTIALS: ${{steps.prepare_gcp_key.outputs.GOOGLE_APPLICATION_CREDENTIALS}}