Giter Site home page Giter Site logo

plantuml-github-action's Introduction

PlantUML GitHub action

This action runs the PlantUML tool to generate images from PlantUML text diagrams.

Inputs

args

Required The arguments for PlantUML tool. Default "-h".

Outputs

Example usage

This is an an example of a workflow which generates the svg and png images from PlantUML text digram. It will trigger every time there is a change in a puml file.

.github/worksflows/main.yml:

name: Generate PlantUML Diagrams
on:
  push:
    paths:
      - '**.puml'
    branches:
      - master
jobs:
  ci:
    runs-on: ubuntu-latest
    env:
        UML_FILES: ".puml"
    steps:
      - name: Checkout Source 
        uses: actions/checkout@v1
      - name: Generate SVG Diagrams
        uses: cloudbees/plantuml-github-action@master
        with:
            args: -v -tsvg $UML_FILES
      - name: Get changed UML files
        id: getfile
        run: |
          echo "::set-output name=files::$(git diff-tree -r --no-commit-id --name-only ${{ github.sha }} | grep ${{ env.UML_FILES }} | xargs)"
      - name: UML files considered echo output
        run: |
          echo ${{ steps.getfile.outputs.files }}
      - name: Generate PNG Diagrams
        uses: cloudbees/plantuml-github-action@master
        with:
            args: -v -tpng $UML_FILES
      - name: Push Local Changes
        uses:  stefanzweifel/[email protected] 
        with: 
          commit_user_name: "my user name"
          commit_user_email: "[email protected]"
          commit_author: "My User <[email protected]>"
          commit_message: "Generate SVG and PNG images for PlantUML diagrams" 
          branch: ${{ github.head_ref }}

The last setp will commit the generated images back into the master branch.

plantuml-github-action's People

Contributors

ccojocar avatar madchap avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.