Skip to content

fix: improve the condition #13

fix: improve the condition

fix: improve the condition #13

name: Count the components
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
count_components:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Count folders
run: |
#!/bin/bash
# Count folders in the repository
folders=$(find . -mindepth 2 -maxdepth 2 -type d -name '[A-Z]*' ! -path '*/.*' -exec sh -c 'dirname="{}"; parent_dir=$(basename "$(dirname "$dirname")"); if [[ "$parent_dir" == [A-Z]* ]]; then echo "{}"; fi' \; | wc -l)
echo "Number of folders: $folders"