Skip to content

Commit

Permalink
Split workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
Johennes committed May 13, 2024
1 parent 99c9ddd commit c7ac750
Show file tree
Hide file tree
Showing 51 changed files with 112 additions and 112 deletions.
55 changes: 55 additions & 0 deletions .github/workflows/generate-images-drawio.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: draw.io images

on:
push:
branches:
- '**'
# paths:
# - 'src/drawio/**'

workflow_dispatch:

env:
DRAWIO_VERSION: 24.2.5
DRAWIO_SRC: src/drawio
DRAWIO_OUT: images/drawio

jobs:
generate:
runs-on: ubuntu-latest

steps:
- name: Check out repository
uses: actions/checkout@v4

- name: Set up Xvfb & draw.io desktop
run: |
wget -q https://github.com/jgraph/drawio-desktop/releases/download/v${{ env.DRAWIO_VERSION }}/drawio-amd64-${{ env.DRAWIO_VERSION }}.deb
sudo apt-get update
sudo apt-get install --yes --no-install-recommends xvfb ./drawio-amd64-${{ env.DRAWIO_VERSION }}.deb
- name: Prepare output folder
run: |
rm -rf "${{ env.DRAWIO_OUT }}"
mkdir -p "${{ env.DRAWIO_OUT }}"
- name: Export draw.io files as png / svg
run: |
# draw.io desktop requires a running X server
export DISPLAY=:42
Xvfb :42 -nolisten unix &
for ext in png svg; do
# The chromium args need to be specified last because of whatever
drawio --export --recursive --format $ext "${{ env.DRAWIO_SRC }}" --no-sandbox --disable-gpu --disable-dev-shm-usage
rsync -v --recursive --include="*.$ext" --filter="-! */" "${{ env.DRAWIO_SRC }}"/* "${{ env.DRAWIO_OUT }}"
# Nuke the exported files so that draw.io desktop doesn't attempt to use them as input files on the next loop pass
find "${{ env.DRAWIO_SRC }}" -name "*.$ext" -exec rm -v "{}" \;
done
- name: Add & Commit
uses: EndBug/add-and-commit@v9
with:
add: ${{ env.DRAWIO_OUT }}
57 changes: 57 additions & 0 deletions .github/workflows/generate-images-plantuml.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: PlantUML images

on:
push:
branches:
- '**'
# paths:
# - 'src/plantuml/**'

workflow_dispatch:

env:
PLANTUML_VERSION: 1.2024.4
PLANTUML_SRC: src/plantuml
PLANTUML_OUT: images/plantuml

jobs:
generate:
runs-on: ubuntu-latest

steps:
- name: Check out repository
uses: actions/checkout@v4

- name: Set up Java
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '11'
check-latest: true

- name: Set up Graphviz
run: |
sudo apt-get update
sudo apt-get install --yes --no-install-recommends graphviz
- name: Download PlantUML JAR
run: |
# Ironically, manually fetching the JAR is faster than installing the Debian plantuml package
wget -O plantuml.jar "https://github.com/plantuml/plantuml/releases/download/v${{ env.PLANTUML_VERSION }}/plantuml-${{ env.PLANTUML_VERSION }}.jar"
- name: Prepare output folder
run: |
rm -rf "${{ env.PLANTUML_OUT }}"
mkdir -p "${{ env.PLANTUML_OUT }}"
- name: Export PlantUML files as png / svg
run: |
for ext in png svg; do
java -jar plantuml.jar -t$ext -v -nometadata -failfast2 -nbthread auto -o "." "${{ env.PLANTUML_SRC }}/**.puml"
rsync -v --recursive --include="*.$ext" --filter="-! */" "${{ env.PLANTUML_SRC }}"/* "${{ env.PLANTUML_OUT }}"
done
- name: Add & Commit
uses: EndBug/add-and-commit@v9
with:
add: ${{ env.PLANTUML_OUT }}
76 changes: 0 additions & 76 deletions .github/workflows/generate-images.yml

This file was deleted.

Binary file removed images/diagrams/System_Overview.png
Binary file not shown.
3 changes: 0 additions & 3 deletions images/diagrams/System_Overview.svg

This file was deleted.

Binary file not shown.
3 changes: 0 additions & 3 deletions images/diagrams/TI-Messenger-Client/System_Overview.svg

This file was deleted.

Binary file not shown.

This file was deleted.

Binary file not shown.

This file was deleted.

Binary file not shown.

This file was deleted.

Binary file not shown.

This file was deleted.

Binary file not shown.

This file was deleted.

Binary file not shown.

This file was deleted.

Binary file not shown.

This file was deleted.

Binary file not shown.

This file was deleted.

Binary file not shown.

This file was deleted.

Binary file not shown.

This file was deleted.

Binary file not shown.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Loading

0 comments on commit c7ac750

Please sign in to comment.