-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
GitHub Action for image generation Debug
GitHub Action for image generation Debug Co-Authored-By: MaxMTheilig <[email protected]>
- Loading branch information
1 parent
bd8e625
commit c050559
Showing
5 changed files
with
17 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 | ||
|
@@ -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 | ||
|
@@ -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]" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.