update f #15
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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: ${{ steps.changed-files.outputs.all_changed_files }} | ||
FILE_ARRAY: ${{ fromJSON("$ALL_CHANGED_FILES") }} | ||
Check failure on line 46 in .github/workflows/trigger-mobile.yml
|
||
run: | | ||
echo "All files: $ALL_CHANGED_FILES" | ||
for file in "$ALL_CHANGED_FILES"; do | ||
echo "$file was changed" | ||
echo "Array: $FILE_ARRAY" | ||
for ff in "$FILE_ARRAY"; do | ||
echo "fff: $ff" | ||
done |