-
Notifications
You must be signed in to change notification settings - Fork 12
43 lines (40 loc) · 1.14 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
40
41
42
43
name: 'CI checks'
on:
pull_request:
branches:
- main
jobs:
ui-changes:
runs-on: ubuntu-latest
name: ui-changes
outputs:
any_modified: ${{ steps.ui-changes.outputs.any_modified }}
all_modified_files: ${{ steps.ui-changes.outputs.all_modified_files }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Get changed files
id: ui-changes
uses: tj-actions/changed-files@v44
with:
write_output_files: true
files: |
src/**
!src/demo/**
.storybook/**
- name: List all changed files
env:
ALL_MODIFIED_FILES: ${{ steps.ui-changes.outputs.all_modified_files }}
ANY_MODIFIED: ${{ steps.ui-changes.outputs.any_modified }}
run: |
echo "Found ${#ALL_MODIFIED_FILES[@]} changed UI file(s)"
for file in ${ALL_MODIFIED_FILES}; do
echo "$file"
done
chromatic:
name: Run Chromatic
needs: [ui-changes]
if: ${{ needs.ui-changes.outputs.any_modified == 'true' }}
uses: ./.github/workflows/chromatic.yml
secrets: inherit