Skip to content

update A

update A #25

# 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 }}
run: |
echo "All files: $ALL_CHANGED_FILES"
for file in "$ALL_CHANGED_FILES"; do
echo "$file was changed"
done
# report-changes:
# name: Report changed-files
# runs-on: ubuntu-latest
# needs: [changed-files]
# strategy:
# matrix:
# files: ${{ fromJSON(needs.changed-files.outputs.matrix) }}
# max-parallel: 4
# fail-fast: false
# steps:
# - name: LOG
# run: |
# echo ${{ matrix.files }}
report-changes2:
name: Report changed-files2
runs-on: ubuntu-latest
needs: [changed-files]
# strategy:
# matrix:
# files: ${{ fromJSON(needs.changed-files.outputs.matrix) }}
# max-parallel: 4
# fail-fast: false
steps:
- name: LOG2
env:
MX_OUTPUT: ${{ needs.changed-files.outputs.matrix }}
run: |
echo "MX: $MX_OUTPUT"
done