@@ -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
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] "
0 commit comments