Skip to content

Commit

Permalink
Create plantuml.yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
spilikin committed Sep 12, 2023
1 parent 3b50a1a commit 4a4f866
Showing 1 changed file with 40 additions and 0 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/plantuml.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: plantuml

on:
push:
branches: [ '*' ]
paths: [ 'src/plantuml/**' ]

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest

steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2

# Runs a single command using the runners shell
- name: Generate images
run: |
mkdir -p images/diagrams
rm -rf images/diagrams/*
for fullname in src/plantuml/*.puml
do
base=$(basename -- "$fullname")
echo ${base%.*}
curl --silent --show-error --fail -H "Content-Type: text/plain; charset=utf-8" \
--data-binary @- https://plantuml.gematik.solutions/plantuml/svg/ \
--output - < "src/plantuml/${base%.*}.puml" > "images/diagrams/${base%.*}.svg"
curl --silent --show-error --fail -H "Content-Type: text/plain; charset=utf-8" \
--data-binary @- https://plantuml.gematik.solutions/plantuml/png/ \
--output - < "src/plantuml/${base%.*}.puml" > "images/diagrams/${base%.*}.png"
done
- name: Add & Commit
uses: EndBug/add-and-commit@v8
with:
add: 'images/diagrams/'

0 comments on commit 4a4f866

Please sign in to comment.