Skip to content

Commit 74d8e12

Browse files
committed
auto-generated diagrams by GitHub Action after source code change
Change to default author simplifier cant process svg, just png
1 parent f62ca53 commit 74d8e12

File tree

5 files changed

+20
-22
lines changed

5 files changed

+20
-22
lines changed

.github/workflows/RenderAllDiagrams.yml

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -43,38 +43,38 @@ jobs:
4343
run: |
4444
img_dir=ImplementationGuide/images/diagrams
4545
mkdir -p $img_dir
46-
rm -rf ImplementationGuide/images/diagrams/*.svg
46+
rm -rf ImplementationGuide/images/diagrams/*.png
4747
48-
# Generate the SVGs from PUML
49-
- name: Render PUML to SVG and Move files
48+
# Generate the PNGs from PUML
49+
- name: Render PUML to PNG and Move files
5050
run: |
5151
FileNamePaths=$(find . -path "*/imgsrc/*/*.puml" -exec dirname {} \; | sort -u)
5252
for dir in $FileNamePaths
5353
do
54-
# Render SVGs from PUMLs
55-
find $dir -name "*.puml" -exec java -jar plantuml.jar -tsvg {} \;
54+
# Render PNGs from PUMLs
55+
find $dir -name "*.puml" -exec java -jar plantuml.jar -png {} \;
5656
done
5757
58-
# Generate the SVGs from DrawIO
59-
- name: Render DrawIO to SVG with predefined action
58+
# Generate the PNGs from DrawIO
59+
- name: Render DrawIO to PNG with predefined action
6060
uses: rlespinasse/drawio-export-action@v2
6161
with:
6262
path: ./Material/imgsrc/drawio/
6363
remove-page-suffix: true
6464
output: .
65-
format: svg
65+
format: png
6666
action-mode: all
6767

68-
# copies the created png & svg files to the images/diagrams folder and deletes the drawio files
69-
- name: Move SVGs to target image folder
68+
# copies the created png & png files to the images/diagrams folder and deletes the drawio files
69+
- name: Move PNGs to target image folder
7070
run: |
7171
img_dir=ImplementationGuide/images/diagrams
72-
# Find all unique directories containing *.svg files under any /imgsrc/ folder
73-
FileNamePaths=$(find . -path "*/imgsrc/*/*.svg" -exec dirname {} \; | sort -u)
72+
# Find all unique directories containing *.png files under any /imgsrc/ folder
73+
FileNamePaths=$(find . -path "*/imgsrc/*/*.png" -exec dirname {} \; | sort -u)
7474
for dir in $FileNamePaths
7575
do
76-
# Move SVGs to out directory
77-
find $dir -name "*.svg" -exec mv {} $img_dir \;
76+
# Move PNGs to out directory
77+
find $dir -name "*.png" -exec mv {} $img_dir \;
7878
done
7979
8080
## add and commit the new generated files
@@ -94,5 +94,4 @@ jobs:
9494
with:
9595
commit_user_name: GitHub Actions Bot
9696
commit_user_email: [email protected]
97-
commit_author: ${{ github.actor }}
9897
commit_message: auto-generated diagrams by GitHub Action after source code change

.github/workflows/RenderPlantUML.yml

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
sudo apt-get install -y graphviz
2424
wget -O plantuml.jar "https://github.com/plantuml/plantuml/releases/latest/download/plantuml.jar"
2525
26-
- name: Render and Move SVG files
26+
- name: Render and Move PNG files
2727
run: |
2828
# Find all unique directories containing *.puml files under any /imgsrc/ folder
2929
directories=$(find . -path "*/imgsrc/*/*.puml" -exec dirname {} \; | sort -u)
@@ -32,11 +32,11 @@ jobs:
3232
out_dir=ImplementationGuide/images/diagrams
3333
mkdir -p $out_dir
3434
35-
# Render SVGs from PUMLs
36-
find $dir -name "*.puml" -exec java -jar plantuml.jar -tsvg {} \;
35+
# Render PNGs from PUMLs
36+
find $dir -name "*.puml" -exec java -jar plantuml.jar -tpng {} \;
3737

38-
# Move SVGs to out directory
39-
find $dir -name "*.svg" -exec mv {} $out_dir \;
38+
# Move PNGs to out directory
39+
find $dir -name "*.png" -exec mv {} $out_dir \;
4040
done
4141

4242

@@ -57,13 +57,12 @@ jobs:
5757
# git config --local user.email "[email protected]"
5858
# git config --local user.name "GitHub Action"
5959
# git add -A
60-
# git commit -m "Add rendered PlantUML to SVG diagrams" || exit 0
60+
# git commit -m "Add rendered PlantUML to PNG diagrams" || exit 0
6161
# git push
6262

6363
- name: Commit rendered files
6464
uses: stefanzweifel/git-auto-commit-action@v5
6565
with:
6666
commit_user_name: GitHub Actions Bot
6767
commit_user_email: [email protected]
68-
commit_author: ${{ github.actor }}
6968
commit_message: auto-generated diagrams by GitHub Action after source code change
Loading
Loading
Loading

0 commit comments

Comments
 (0)