generated from ministryofjustice/hmpps-template-kotlin
-
Notifications
You must be signed in to change notification settings - Fork 1
36 lines (34 loc) · 1.05 KB
/
generate-plantuml-diagrams.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
name: Generate PlantUML Diagrams
on:
- workflow_dispatch
- push
jobs:
generate-diagrams:
if: github.actor != 'dependabot[bot]'
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./docs/diagrams
env:
BRANCH_NAME: ${{ github.head_ref || github.ref_name }}
steps:
- uses: actions/checkout@v4
- name: Install Graphviz Dependency
run: |
sudo apt-get install graphviz
- name: Install PlantUML
run: |
wget https://github.com/plantuml/plantuml/releases/download/v1.2023.1/plantuml.jar
java -jar plantuml.jar -version
- name: Generate Diagrams
run: |
java -jar plantuml.jar -svg *.puml
- name: Setup Git Config
run: |
git config user.name 'github-actions[bot]'
git config user.email 'github-actions[bot]@users.noreply.github.com'
- name: Commit images
run: |
git add *.svg
git commit -m "Exported .PUML PlantUML diagrams to .SVG" || true
git push origin ${BRANCH_NAME}