Skip to content

Commit

Permalink
Generate images with PlantUML JAR
Browse files Browse the repository at this point in the history
  • Loading branch information
TommasoLencioni committed Mar 26, 2024
1 parent 2c604d7 commit ba9520b
Showing 1 changed file with 50 additions and 0 deletions.
50 changes: 50 additions & 0 deletions .github/workflows/plantUML.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: Generate PlantUML Diagrams

on:
pull_request:
types:
- closed
branches:
- main
- v2

jobs:
generate_diagrams:
if: github.event.pull_request.merged == true

runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Set up Java
uses: actions/setup-java@v2
with:
distribution: 'adopt'
java-version: '11'

- name: Install Graphviz
run: |
apt-get update -q
apt-get install -y graphviz wget
- name: Download PlantUML
run: |
wget https://sourceforge.net/projects/plantuml/files/plantuml.jar/download -O plantuml.jar
- name: Generate Diagrams
run: |
for file in $(find ./src/site -type f -name "MAIN_*.puml"); do
java -jar plantuml.jar "$file" -tsvg
done
- name: Commit and push changes
run: |
git config user.name "GitHub Workflow"
git config user.email "<>"
for file in $(find ./src/site -type f -name "*.svg"); do
git add "$file"
done
git commit -m "PlantUML images updated"
git push origin ${{ github.ref_name }}

0 comments on commit ba9520b

Please sign in to comment.