-
Notifications
You must be signed in to change notification settings - Fork 0
49 lines (47 loc) · 1.39 KB
/
trigger-mobile.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
45
46
47
48
49
# IWDS Mobile Component Monitor
# Monitors changes to specific files/folders and dispatches the information to
# a serverless function
# See !! comments below for setup
name: 'IWDS Mobile Component Monitor'
on:
push:
branches:
# !! set to the name of the primary branch: 'main' or 'master'
- 'main'
paths:
# !! set to the directory which contains the IWDS components
- 'components/mobile/**'
jobs:
# Gather all changed files into a matrix
changed-files:
name: Get changed files
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.changed-files.outputs.all_changed_files }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@v41
with:
json: true
quotepath: false
escape_json: false
dir_names: "false"
# !! set path to the directory which contains the IWDS components
path: 'components/mobile/'
files: |
**.js
**.jsx
**.ts
**.tsx
- name: List all changed files
env:
ALL_CHANGED_FILES: ${{ contains(steps.changed-files.outputs.all_changed_files, '/') }}
run: |
for file in "$ALL_CHANGED_FILES"; do
echo "$file was changed"
done