Render PlantUML Diagrams #34
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Render PlantUML Diagrams | |
| on: | |
| push: | |
| paths: | |
| - '**.puml' | |
| - '.github/workflows/plantuml.yml' | |
| workflow_dispatch: | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| render: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| env: | |
| PLANTUML_VERSION: "1.2026.0" | |
| steps: | |
| - name: Checkout repo | |
| uses: actions/checkout@v4 | |
| - name: Set up Java | |
| uses: actions/setup-java@v4 | |
| with: | |
| distribution: temurin | |
| java-version: '17' | |
| - name: Install Graphviz | |
| run: sudo apt-get update -q && sudo apt-get install -y graphviz | |
| - name: Fetch PlantUML jar | |
| run: | | |
| curl -fsSL -o plantuml.jar \ | |
| "https://github.com/plantuml/plantuml/releases/download/v${PLANTUML_VERSION}/plantuml-${PLANTUML_VERSION}.jar" | |
| java -jar plantuml.jar -version | |
| - name: Render SVG | |
| run: | | |
| find . -name '*.puml' -not -path './.git/*' -print0 \ | |
| | xargs -0 -r java -jar plantuml.jar -tsvg -nometadata | |
| - name: Commit rendered diagrams | |
| uses: stefanzweifel/git-auto-commit-action@v5 | |
| with: | |
| commit_message: "ci: auto-render PlantUML diagrams" | |
| file_pattern: "**/*.svg" | |
| commit_user_name: "github-actions[bot]" | |
| commit_user_email: "github-actions[bot]@users.noreply.github.com" |