GitHub action to generate plantuml files
This file contains 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: Generate PlantUML Diagrams | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
plantuml: | |
runs-on: ubuntu-latest | |
env: | |
UML_FILES: ".puml" | |
steps: | |
- name: Checkout Source | |
uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
- uses: dorny/paths-filter@v2 | |
name: "Get PUML files" | |
id: filter | |
with: | |
list-files: 'shell' | |
base: 'main' | |
filters: | | |
puml: | |
- '**.puml' | |
- name: Generate SVG Diagrams | |
uses: cloudbees/plantuml-github-action@master | |
if: steps.filter.outputs.puml == 'true' | |
with: | |
args: -v -tsvg ${{ steps.filter.outputs.puml_files }} | |
- name: Generate PNG Diagrams | |
uses: cloudbees/plantuml-github-action@master | |
if: steps.filter.outputs.puml == 'true' | |
with: | |
args: -v -tpng ${{ steps.filter.outputs.puml_files }} | |
- name: Push Local Changes | |
if: steps.filter.outputs.puml == 'true' | |
uses: stefanzweifel/git-auto-commit-action@v4.1.2 | |
with: | |
commit_user_name: "CI GitHub Action" | |
commit_user_email: "ci@mail.net" | |
commit_author: "CI GitHub Action <ci@mail.net>" | |
commit_message: "Generate SVG and PNG images for PlantUML diagrams" | |
branch: ${{ github.head_ref }} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment