-
Notifications
You must be signed in to change notification settings - Fork 12
39 lines (36 loc) · 1.03 KB
/
pull-request.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
name: 'CI checks'
on:
pull_request:
branches:
- main
jobs:
ui-changes:
runs-on: ubuntu-latest
name: ui-changes
outputs:
all_changed_files: ${{ steps.ui-changes.outputs.all_changed_files }}
any_changed: ${{ steps.ui-changes.outputs.any_changed }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@v44
with:
files: |
src/*
!src/demo/**
.storybook/**
- name: List all changed files
env:
ALL_CHANGED_FILES: ${{ steps.ui-changes.outputs.all_changed_files }}
ANY_CHANGED: ${{ steps.ui-changes.outputs.any_changed }}
run: |
echo "Found ${#ALL_CHANGED_FILES[@]} changed UI file(s), $ANY_CHANGED"
chromatic:
name: Run Chromatic
needs: [ui-changes]
if: ${{ needs.ui-changes.outputs.any_changed == 'true' }}
uses: ./.github/workflows/chromatic.yml
secrets: inherit