Skip to content

Commit c050559

Browse files
GitHub Action for image generation Debug
GitHub Action for image generation Debug Co-Authored-By: MaxMTheilig <[email protected]>
1 parent bd8e625 commit c050559

File tree

5 files changed

+17
-13
lines changed

5 files changed

+17
-13
lines changed

.github/workflows/RenderAllDiagrams.yml

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -39,22 +39,18 @@ jobs:
3939
# Clean Folder
4040
- name: Ensure and clean folder
4141
run: |
42-
imagedir=ImplementationGuide/diagrams
43-
mkdir -p $imagedir
42+
img_dir=ImplementationGuide/diagrams
43+
mkdir -p $img_dir
4444
rm -rf ImplementationGuide/diagrams/*.svg
4545
4646
# Generate the SVGs from PUML
4747
- name: Render PUML to SVG and Move files
4848
run: |
49-
imagedir=ImplementationGuide/diagrams
5049
FileNamePaths=$(find . -path "*/imgsrc/*/*.puml" -exec dirname {} \; | sort -u)
5150
for dir in $FileNamePaths
5251
do
5352
# Render SVGs from PUMLs
5453
find $dir -name "*.puml" -exec java -jar plantuml.jar -tsvg {} \;
55-
56-
# Move SVGs to out directory
57-
find $dir -name "*.svg" -exec mv {} $out_dir \;
5854
done
5955
6056
# Generate the SVGs from DrawIO
@@ -67,11 +63,16 @@ jobs:
6763
action-mode: all
6864

6965
# copies the created png & svg files to the images/diagrams folder and deletes the drawio files
70-
- name: Copy draw io
66+
- name: Move SVGs to target image folder
7167
run: |
72-
imagedir=ImplementationGuide/images/diagrams
73-
cp -RT ./Material/imgsrc/drawio/ $imagedir
74-
find $imagedir -name '*.drawio' -exec rm -rv {} \;
68+
img_dir=ImplementationGuide/images/diagrams
69+
# Find all unique directories containing *.svg files under any /imgsrc/ folder
70+
FileNamePaths=$(find . -path "*/imgsrc/*/*.svg" -exec dirname {} \; | sort -u)
71+
for dir in $FileNamePaths
72+
do
73+
# Move SVGs to out directory
74+
find $dir -name "*.svg" -exec mv {} $img_dir \;
75+
done
7576
7677
# add and commit the new generated files
7778
- name: Create Pull Request
@@ -81,7 +82,7 @@ jobs:
8182
commit-message: Generated Images from source Code by GitHub Action
8283
title: Generated Images from GitHub Action
8384
assignees: ${{ github.actor }}
84-
reviewer: ${{ github.actor }}
85+
reviewers: ${{ github.actor }}
8586
#- name: Commit and push
8687
# run: |
8788
# git config --local user.email "[email protected]"

.github/workflows/RenderPlantUML.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ jobs:
4646
commit-message: Generated Images from source Code by GitHub Action
4747
title: Generated Images from GitHub Action
4848
assignees: ${{ github.actor }}
49-
reviewer: ${{ github.actor }}
49+
reviewers: ${{ github.actor }}
5050

5151
#- name: Commit and push
5252
# run: |

0 commit comments

Comments
 (0)