Skip to content

Commit

Permalink
GitHub Action for image generation Debug
Browse files Browse the repository at this point in the history
GitHub Action for image generation Debug

Co-Authored-By: MaxMTheilig <[email protected]>
  • Loading branch information
github-actions[bot] and MaxMTheilig committed Jan 9, 2024
1 parent bd8e625 commit c050559
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 13 deletions.
23 changes: 12 additions & 11 deletions .github/workflows/RenderAllDiagrams.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,22 +39,18 @@ jobs:
# Clean Folder
- name: Ensure and clean folder
run: |
imagedir=ImplementationGuide/diagrams
mkdir -p $imagedir
img_dir=ImplementationGuide/diagrams
mkdir -p $img_dir
rm -rf ImplementationGuide/diagrams/*.svg
# Generate the SVGs from PUML
- name: Render PUML to SVG and Move files
run: |
imagedir=ImplementationGuide/diagrams
FileNamePaths=$(find . -path "*/imgsrc/*/*.puml" -exec dirname {} \; | sort -u)
for dir in $FileNamePaths
do
# Render SVGs from PUMLs
find $dir -name "*.puml" -exec java -jar plantuml.jar -tsvg {} \;
# Move SVGs to out directory
find $dir -name "*.svg" -exec mv {} $out_dir \;
done
# Generate the SVGs from DrawIO
Expand All @@ -67,11 +63,16 @@ jobs:
action-mode: all

# copies the created png & svg files to the images/diagrams folder and deletes the drawio files
- name: Copy draw io
- name: Move SVGs to target image folder
run: |
imagedir=ImplementationGuide/images/diagrams
cp -RT ./Material/imgsrc/drawio/ $imagedir
find $imagedir -name '*.drawio' -exec rm -rv {} \;
img_dir=ImplementationGuide/images/diagrams
# Find all unique directories containing *.svg files under any /imgsrc/ folder
FileNamePaths=$(find . -path "*/imgsrc/*/*.svg" -exec dirname {} \; | sort -u)
for dir in $FileNamePaths
do
# Move SVGs to out directory
find $dir -name "*.svg" -exec mv {} $img_dir \;
done
# add and commit the new generated files
- name: Create Pull Request
Expand All @@ -81,7 +82,7 @@ jobs:
commit-message: Generated Images from source Code by GitHub Action
title: Generated Images from GitHub Action
assignees: ${{ github.actor }}
reviewer: ${{ github.actor }}
reviewers: ${{ github.actor }}
#- name: Commit and push
# run: |
# git config --local user.email "[email protected]"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/RenderPlantUML.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ jobs:
commit-message: Generated Images from source Code by GitHub Action
title: Generated Images from GitHub Action
assignees: ${{ github.actor }}
reviewer: ${{ github.actor }}
reviewers: ${{ github.actor }}

#- name: Commit and push
# run: |
Expand Down
Loading

0 comments on commit c050559

Please sign in to comment.