Skip to content

GeneratePlantumlImages #93

GeneratePlantumlImages

GeneratePlantumlImages #93

name: GeneratePlantumlImages
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/'