#!/bin/bash


echo $CHANGED_DIRS

s
IFS=',' read -ra DIRS <<< "${CHANGED_DIRS//[\[\]]/}"

echo num of changed dirs ${#DIRS[@]}

if [ "${#DIRS[@]}" -gt 1 ]; then
  echo ":stop_sign: to many files chaned for repo $REPO_NAME" >> $GITHUB_STEP_SUMMARY
  echo "the list of the chaned files: $CHANGED_DIRS" >> $GITHUB_STEP_SUMMARY
  exit 1
else
  echo "There is only one item in the list."
  echo ":white_check_mark: tests passed seccsesfuly" >> $GITHUB_STEP_SUMMARY
  exit 0
fi