-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathaction.yaml
61 lines (54 loc) · 1.94 KB
/
action.yaml
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
name: 'Pyarch: python package architecture as webpage'
description: 'Generate dynamic UML diagrams of python package as a single HTML'
inputs:
input:
description: 'Directory with the package source code'
required: true
output:
description: 'Directory to save generated HTML file'
required: false
default: '.pyarch/output'
title:
description: 'Custom HTML title'
required: false
default: 'Python package architecture'
header:
description: 'Custom HTML header'
required: false
default: 'Python package architecture'
footer:
description: 'Custom HTML footer'
required: false
default: '<p style="font-size:15px">Built with ❤️ by <a href="https://www.dkisler.com" target=_blank>Dmitry Kisler - dkisler.com</a></p>'
outputs:
output:
description: 'Path to generated HTML file'
value: ${{ steps.generate-html.outputs.output }}
runs:
using: "composite"
steps:
- shell: bash
run: |
if [ ! -d .pyarch/output ]; then mkdir -p .pyarch/output; fi
curl -SLo .pyarch/pyarch https://github.com/kislerdm/pyarch/releases/download/v0.0.2/pyarch
- uses: actions/setup-python@v4
with:
python-version: "3.9"
- shell: bash
run: |
python -m pip install --upgrade pip
pip install pylint
- id: generate-uml
shell: bash
run: |
if [ ! -d ${{ inputs.output }}/uml ]; then mkdir -p ${{ inputs.output }}/uml; fi
pyreverse -Akmy -o puml -d ${{ inputs.output }}/uml --ignore=test,tests ${{ inputs.input }}
- id: generate-html
shell: bash
run: |
python .pyarch/pyarch -v --output ${{ inputs.output }} --input ${{ inputs.output }}/uml --title "${{ inputs.title }}" --header "${{ inputs.header }}" --footer "${{ inputs.footer }}"
rm -r ${{ inputs.output }}/uml
echo "output=$(echo ${{ inputs.output }}/index.html)" >> $GITHUB_OUTPUT
branding:
icon: 'arrow-up-circle'
color: 'green'