grassedge / generate-plantuml-action Goto Github PK
View Code? Open in Web Editor NEWGenerate uml diagrams with Plantuml Server and push them to your repository.
License: MIT License
Generate uml diagrams with Plantuml Server and push them to your repository.
License: MIT License
the present release v1.5.0 returned node12
the master branch has node16
do you want some assistance with housekeeping PR's?
If files that have following suffixes, generate too.
.wsd
.pu
.puml
.plantuml
.iuml
I've managed to setup the action for the master
branch, but I'd like to also generate images on other branches, so that my reviewers can read our documentation with consistent diagrams during their reviews.
My workflow is the following:
name: Generate diagrams
on: push
jobs:
generate_plantuml:
runs-on: ubuntu-latest
name: plantuml
steps:
- uses: actions/checkout@v2
- name: plantuml
uses: grassedge/generate-plantuml-action@master
with:
path: diagrams
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Unfortunately, it does not work on branches other than master
, for example on feat/mvpVersion
:
Set up job
Run actions/checkout@v2
remote: Counting objects: 94% (18/19)
Run actions/checkout@v2
Syncing repository: repo
Getting Git version info
Deleting the contents of '/home/runner/work/repo'
Initializing the repository
Disabling automatic garbage collection
Setting up auth
Fetching the repository
Determining the checkout info
Checking out the ref
/usr/bin/git checkout --progress --force -B feat/mvpVersion refs/remotes/origin/feat/mvpVersion
Switched to a new branch 'feat/mvpVersion'
Branch 'feat/mvpVersion' set up to track remote branch 'feat/mvpVersion' from 'origin'.
/usr/bin/git log -1
commit 712a0ef519c421a60cc9f416f29a01f77ddf2e22
Author: Laurent
Date: Thu Jun 18 19:13:26 2020 +0200
plantuml
GITHUB_TOKEN: ***
Run grassedge/generate-plantuml-action@master
There are no files to be generated.
Did I miss something, or the generation only works on master
?
I've got some issues when running this action on my repo :(
##[error]TypeError: Cannot read property 'references' of undefined
##[error]Node run failed with exit code 1
Here is my yml
file :
name: generate plantuml
on: [push]
jobs:
generate_plantuml:
runs-on: ubuntu-latest
name: plantuml
steps:
- name: checkout
uses: actions/checkout@v1
with:
fetch-depth: 1
- name: plantuml
id: plantuml
uses: grassedge/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Howdy. Just noticed that #46 is still affecting this code - users get a warning that 'node16' will be used. It's been a while since the last commit on the default branch. Any news? Thanks.
We've been scratching our heads on this one!
With a file ending .puml it reports no files found. Rename it to .pml and it bursts to life!
Perhaps something happening at the checkout level?
When I add a PlantUML diagram to a markdown file the action throws the following error:
Error: HttpError: tree.path contains a malformed path component
Seems to be a GitHub API error. It works perfectly fine for .puml files. Here is my workflow:
name: Generate PlantUML
on: push
jobs:
generate_plantuml:
runs-on: ubuntu-latest
name: plantuml
steps:
- name: checkout
uses: actions/checkout@v1
with:
fetch-depth: 1
- name: plantuml
id: plantuml
uses: grassedge/[email protected]
with:
message: "Render PlantUML files"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Also tried with path: .
set; same error.
The .md file in question:
# Test PlantUML Diagram
Sequence diagram:
` ` `plantuml:test-md-diagram
Alice -> Bob: Authentication Request
Bob --> Alice: Authentication Response
Alice -> Bob: Another authentication Request
Alice <-- Bob: another authentication Response
` ` `
![](./test-md-diagram.svg)
(rendered diagram should appear above)
I have two files. (Pseudo-representation below, scrubbed for privacy)
One is a large file in a parent directory called definitions.puml
The other file is in a subfolder called architecture.pu
They are arranged like so.
src/definitions.puml
'' DATABASE DEF
!define db_name Name of database
!define db_tech technology: technology desc
!define db_desc Holds data for system.
' ... etc
src/level1/architecture.pu
@startuml
!include ../definitions.puml
' rest of content below
@enduml
The outcome is a generated SVG that is "undefined" and has no content.
Github preview reads: Sorry, this file is invalid so it cannot be displayed.
Edit:
I have even tried this format !include %dirpath/../definitions.puml
No luck.
In most case we just want to display the diagram instead of the palntuml code.
hopes to support place plantuml code in
Are there any technical reasons why generate-plantuml-action
needs access to a GitHub token?
I have seen GitHub actions that commit to the repo without having access to the GitHub token.
Hey @grassedge .
What do you think about dropping the adding and committing from this action?
There's plenty of actions in the marketplace to do just that and it would enable people to
##[error]Error: ENOENT: no such file or directory, open 'path/to/deleted.md'
This action recognizes deleted files as diff
and tries to generate svg.
Fix to ignore them.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.