This repository has been archived by the owner on Oct 16, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathaction.yaml
65 lines (56 loc) · 1.89 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
62
63
64
65
name: Create CI Documentation (Dispatch)
description: 'Analyze the GitHub workflows in a repository, and produce documentation and diagrams.'
author: Chris Compton <[email protected]>
inputs:
artifact_name:
description: 'The name to use for the result artifact. Defaults to content.'
required: false
default: 'content'
output_path:
description: 'The path to use inside artifact, and will be the location of extraction in your repository. Defaults to output.'
required: false
default: 'output'
file_prefix:
description: 'The prefix to apply to all created files. Defaults to Project.'
required: false
default: 'Project'
markdown_name:
description: 'The name of the markdown file. Defaults to a combination of the prefix and other elements.'
required: false
runs:
using: composite
steps:
- name: Check out repository code.
uses: actions/checkout@v3
- name: Set up Python.
uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Set up Graphviz.
shell: bash
run: |
sudo apt install graphviz
- name: Log the environment.
shell: bash
run: |
python --version
pip --version
- name: Install any dependencies.
shell: bash
run: pip install -r ${{ github.action_path }}/requirements.txt
- name: Execute script.
shell: bash
env:
output_path: ${{ inputs.output_path }}
file_prefix: ${{ inputs.file_prefix }}
markdown_name: ${{ inputs.markdown_name }}
run: |
python ${{ github.action_path }}/app.py
ls -ltra ${{ inputs.output_path }}
- name: Save the results.
uses: actions/upload-artifact@v3
with:
name: ${{ inputs.artifact_name }}
path: |
${{ inputs.output_path }}/${{ inputs.file_prefix }}*.graph.svg
${{ inputs.output_path }}/*.md