Digraph to SVG runs graphviz to compile DOT (graph description language) files which can be maintained by a person into svg files that can be displayed by a browser.
- Install it as a Github Action
- Check in a digraph dot file named with the
.dot
extension - This action will create and commit a
.svg
file in the same directory with the base name (iemy-graph.dot
->my-graph.svg
)
If you want this action to run on every pull request that changes a *.dot
file create the following in your project as .github/workflows/main.yml
on:
pull_request:
paths:
- "**.dot"
jobs:
digraph_to_svg_job:
runs-on: ubuntu-latest
name: Create svg image from digraph .dot file
steps:
- uses: actions/checkout@v2
with:
ref: ${{ github.head_ref }}
- name: Digraph to SVG step
id: digraph_to_svg
uses: alexrothenberg/digraph-to-svg-action@master
When you create a pull request that adds or updates a .dot
file like example/graph.dot the action will run and you'll see a new commit from actions-user
in your pull adding example/graph.svg like
- The Dockerfile installs graphviz in this action
- entrypoint.sh
- scans for files
.dot
files and runs graphviz to generate a.svg
for each - commits the changes back into the branch of your github repo that triggered the action
- scans for files
Contributions are welcome as github pull requests at https://github.com/alexrothenberg/digraph-to-svg-action
Licensed under MIT License. See LICENSE for more details.