fix: Fix urls #42
This file contains hidden or 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
name: Export PlantUML diagrams of the examples directory | |
on: | |
push: | |
branches: ["main"] | |
pull_request: | |
branches: ["main"] | |
jobs: | |
export-diagrams: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repo | |
uses: actions/checkout@v4.2.2 | |
- name: Get all changed files | |
id: get-changed-files | |
uses: jitterbit/get-changed-files@v1 | |
- name: Get changed UML files | |
id: get-changed-uml-files | |
run: | | |
puml_files='' | |
for changed_file in ${{ steps.get-changed-files.outputs.added_modified}}; do | |
extension="${changed_file##*.}" | |
if [[ "${extension}" == "puml" && "${changed_file}" == examples/* ]]; then | |
# add puml file | |
puml_files="${puml_files} ${changed_file}" | |
echo "Added file: ${changed_file}" | |
fi | |
done | |
echo "puml-files=${puml_files}" >> $GITHUB_OUTPUT | |
- name: Generate SVG Diagrams | |
uses: dreamsinbits/export-plantuml-action@v1 | |
with: | |
args: -v -o out -tsvg ${{ steps.get-changed-uml-files.outputs.puml-files }} | |
- name: Push Local Changes | |
uses: stefanzweifel/git-auto-commit-action@v5 | |
with: | |
commit_user_name: "PlantUML Diagramm Renderer" | |
commit_user_email: "plantuml@trapp-software.de" | |
commit_author: "PLantUML <plantuml@trapp-software.de>" | |
commit_message: "docs(examples): Generated SVG images for PlantUML diagrams" | |
branch: ${{ github.head_ref }} |