Skip to content

Commit 36cf926

Browse files
committed
3333
1 parent 13f2414 commit 36cf926

1 file changed

Lines changed: 17 additions & 1 deletion

File tree

.github/workflows/automatic_image_genration.yml

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ jobs:
127127
# Determine processing mode
128128
if [ "${{ github.event.inputs.regenerate_all }}" = "true" ] || [ "${{ github.event_name }}" = "workflow_dispatch" ]; then
129129
echo "🔄 FULL REGENERATION MODE - Processing all files"
130-
puml_files=$(find $(pwd)/${{ env.REL_PLANTUML_INPUT_DIR }} -name "*.puml" -o -name "*.plantuml" 2>/dev/null)
130+
puml_files=$(find ${{ env.REL_PLANTUML_INPUT_DIR }} -name "*.puml" -o -name "*.plantuml" 2>/dev/null)
131131
132132
if [ -z "$puml_files" ]; then
133133
echo "❌ No PlantUML files found in ${{ env.REL_PLANTUML_INPUT_DIR }}/"
@@ -303,6 +303,14 @@ jobs:
303303
drawio_dir="${{ env.REL_DRAWIO_INPUT_DIR }}"
304304
png_files=($(find "$(pwd)/$drawio_dir" -name "*.png" -type f | sort))
305305
306+
# Prüfung auf leeres Array
307+
if [ ${#png_files[@]} -eq 0 ]; then
308+
echo "❌ Keine PNG-Dateien gefunden in '$(pwd)/$drawio_dir'"
309+
exit 1
310+
else
311+
echo "📁 Gefunden: ${#png_files[@]} PNG-Datei(en)"
312+
fi
313+
306314
for i in "${!png_files[@]}"; do
307315
source_file="${png_files[$i]}"
308316

@@ -344,6 +352,14 @@ jobs:
344352
drawio_dir="${{ env.REL_DRAWIO_INPUT_DIR }}"
345353
svg_files=($(find "$(pwd)/$drawio_dir" -name "*.svg" -type f | sort))
346354

355+
# Prüfung auf leeres Array
356+
if [ ${#svg_files[@]} -eq 0 ]; then
357+
echo "❌ Keine SVG-Dateien gefunden in '$(pwd)/$drawio_dir'"
358+
exit 1 # oder return 1 in Funktion
359+
else
360+
echo "📁 Gefunden: ${#svg_files[@]} SVG-Datei(en)"
361+
fi
362+
347363
for i in "${!svg_files[@]}"; do
348364
source_file="${svg_files[$i]}"
349365

0 commit comments

Comments
 (0)