-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathaction.yml
44 lines (41 loc) · 1.18 KB
/
action.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
name: python-code-visualiser
author: mike@trebilcock.net
description: 'Create Mermaid diagrams from Python code'
branding:
icon: 'file-text'
color: 'green'
inputs:
gh-token:
description: 'GITHUB_TOKEN or a `repo` scoped Personal Access Token (PAT)'
default: ${{ github.token }}
runs:
using: 'composite'
steps:
- name: install nightly
run: |
rustup set profile minimal
rustup toolchain install nightly
shell: bash
- name: build pymermaider
run: |
git clone https://github.com/diceroll123/pymermaider
cd pymermaider
cargo build --release
shell: bash
- name: run pymermaider
run: |
pymermaider/target/release/pymermaider .
cat ./output/${{ github.event.repository.name }}.md
shell: bash
- name: upload artifacts
uses: actions/upload-artifact@v4
with:
name: mermaid-diagrams
path:
./output/${{ github.event.repository.name }}.md
- name: Upload mermaid md file diagram into PR
uses: thollander/actions-comment-pull-request@v2
with:
GITHUB_TOKEN: ${{ inputs.gh-token }}
filePath: ./output/${{ github.event.repository.name }}.md
comment_tag: 'mermaid-diagram'