Skip to content

Commit ad2f26d

Browse files
committed
111
1 parent 40a1028 commit ad2f26d

1 file changed

Lines changed: 16 additions & 16 deletions

File tree

.github/workflows/automatic_image_genration.yml

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -55,19 +55,19 @@ jobs:
5555
find . -name "*.puml" -o -name "*.plantuml" -o -name "*.drawio" -o -name "*.dio" | head -20 || echo "No diagram files found"
5656
echo ""
5757
echo "=== src/plantuml contents ==="
58-
if [ -d "${{ REL_PLANTUML_INPUT_DIR }}" ]; then
59-
ls -la ${{ REL_PLANTUML_INPUT_DIR }}/
60-
echo "PlantUML file count: $(find ${{ REL_PLANTUML_INPUT_DIR }} -name "*.puml" -o -name "*.plantuml" | wc -l)"
58+
if [ -d "${{ env.REL_PLANTUML_INPUT_DIR }}" ]; then
59+
ls -la ${{ env.REL_PLANTUML_INPUT_DIR }}/
60+
echo "PlantUML file count: $(find ${{ env.REL_PLANTUML_INPUT_DIR }} -name "*.puml" -o -name "*.plantuml" | wc -l)"
6161
else
62-
echo "❌ ${{ REL_PLANTUML_INPUT_DIR }} directory not found"
62+
echo "❌ ${{ env.REL_PLANTUML_INPUT_DIR }} directory not found"
6363
fi
6464
echo ""
6565
echo "=== src/drawio contents ==="
66-
if [ -d "${{ REL_DRAWIO_INPUT_DIR }}" ]; then
67-
ls -la ${{ REL_DRAWIO_INPUT_DIR }}/
68-
echo "Draw.io file count: $(find ${{ REL_DRAWIO_INPUT_DIR }} -name "*.drawio" -o -name "*.dio" | wc -l)"
66+
if [ -d "${{ env.REL_DRAWIO_INPUT_DIR }}" ]; then
67+
ls -la ${{ env.REL_DRAWIO_INPUT_DIR }}/
68+
echo "Draw.io file count: $(find ${{ env.REL_DRAWIO_INPUT_DIR }} -name "*.drawio" -o -name "*.dio" | wc -l)"
6969
else
70-
echo "❌ ${{ REL_DRAWIO_INPUT_DIR }} directory not found"
70+
echo "❌ ${{ env.REL_DRAWIO_INPUT_DIR }} directory not found"
7171
fi
7272
7373
- name: ☕ Set up JDK 11
@@ -127,18 +127,18 @@ 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)/${{ REL_PLANTUML_INPUT_DIR }} -name "*.puml" -o -name "*.plantuml" 2>/dev/null)
130+
puml_files=$(find $(pwd)/${{ env.REL_PLANTUML_INPUT_DIR }} -name "*.puml" -o -name "*.plantuml" 2>/dev/null)
131131
132132
if [ -z "$puml_files" ]; then
133-
echo "❌ No PlantUML files found in ${{ REL_PLANTUML_INPUT_DIR }}/"
133+
echo "❌ No PlantUML files found in ${{ env.REL_PLANTUML_INPUT_DIR }}/"
134134
exit 0
135135
fi
136136
137137
echo "📋 Found PlantUML files:"
138138
echo "$puml_files"
139139
else
140140
echo "⚡ INCREMENTAL MODE - Processing only changed files"
141-
changed_puml_files=$(git diff --name-only HEAD~1 HEAD | grep -E '\.(puml|plantuml)$' | grep '^${{ REL_PLANTUML_INPUT_DIR }}/' || true)
141+
changed_puml_files=$(git diff --name-only HEAD~1 HEAD | grep -E '\.(puml|plantuml)$' | grep '^${{ env.REL_PLANTUML_INPUT_DIR }}/' || true)
142142
143143
if [ -z "$changed_puml_files" ]; then
144144
echo "ℹ️ No PlantUML files changed in this commit"
@@ -232,18 +232,18 @@ jobs:
232232
# Determine processing mode
233233
if [ "${{ github.event.inputs.regenerate_all }}" = "true" ] || [ "${{ github.event_name }}" = "workflow_dispatch" ]; then
234234
echo "🔄 FULL REGENERATION MODE - Processing all files"
235-
drawio_files=$(find ${{ REL_DRAWIO_INPUT_DIR }} -name "*.drawio" -o -name "*.dio" 2>/dev/null)
235+
drawio_files=$(find ${{ env.REL_DRAWIO_INPUT_DIR }} -name "*.drawio" -o -name "*.dio" 2>/dev/null)
236236
237237
if [ -z "$drawio_files" ]; then
238-
echo "❌ No drawio files found in ${{ REL_DRAWIO_INPUT_DIR }}/"
238+
echo "❌ No drawio files found in ${{ env.REL_DRAWIO_INPUT_DIR }}/"
239239
exit 0
240240
fi
241241
242242
echo "📋 Found drawio files:"
243243
echo "$drawio_files"
244244
else
245245
echo "⚡ INCREMENTAL MODE - Processing only changed files"
246-
changed_drawio_files=$(git diff --name-only HEAD~1 HEAD | grep -E '\.(drawio|dio)$' | grep '^${{ REL_DRAWIO_INPUT_DIR }}/' || true)
246+
changed_drawio_files=$(git diff --name-only HEAD~1 HEAD | grep -E '\.(drawio|dio)$' | grep '^${{ env.REL_DRAWIO_INPUT_DIR }}/' || true)
247247
248248
if [ -z "$changed_drawio_files" ]; then
249249
echo "ℹ️ No drawio files changed in this commit"
@@ -300,7 +300,7 @@ jobs:
300300
fi
301301
302302
# find all docker drawio generated *.png images, rename and move them to the /image folder
303-
png_files=($(find "$(pwd)/${{ REL_DRAWIO_INPUT_DIR }}" -name "*.png" -type f | sort))
303+
png_files=($(find "$(pwd)/${{ env.REL_DRAWIO_INPUT_DIR }}" -name "*.png" -type f | sort))
304304
305305
for i in "${!png_files[@]}"; do
306306
source_file="${png_files[$i]}"
@@ -340,7 +340,7 @@ jobs:
340340
fi
341341

342342
# find all docker drawio generated *.svg images, rename and move them to the /image folder
343-
svg_files=($(find "$(pwd)/${{ REL_DRAWIO_INPUT_DIR }}" -name "*.svg" -type f | sort))
343+
svg_files=($(find "$(pwd)/${{ env.REL_DRAWIO_INPUT_DIR }}" -name "*.svg" -type f | sort))
344344

345345
for i in "${!svg_files[@]}"; do
346346
source_file="${svg_files[$i]}"

0 commit comments

Comments
 (0)