-
Notifications
You must be signed in to change notification settings - Fork 12
44 lines (41 loc) · 1.45 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
44
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_count: ${{ steps.ui-changes.outputs.all_modified_files_count }}
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/**
.storybook/**
- name: Verify the contents of the .github/outputs/added_files.txt file
run: |
cat .github/outputs/added_files.txt
- name: List all changed files
env:
ALL_MODIFIED_FILES: ${{ steps.ui-changes.outputs.all_modified_files }}
ALL_MODIFIED_FILES_COUNT: ${{ steps.ui-changes.outputs.all_modified_files_count }}
ANY_MODIFIED: ${{ steps.ui-changes.outputs.any_modified }}
run: |
echo "Found ${#ALL_MODIFIED_FILES[@]} changed UI file(s), ${{ steps.ui-changes.outputs.all_modified_files_count }}, ${{ steps.ui-changes.outputs.any_modified }}"
chromatic:
name: Run Chromatic
needs: [ui-changes]
if: ${{ needs.ui-changes.outputs.any_modified == 'true' }}
uses: ./.github/workflows/chromatic.yml
secrets: inherit