-
Notifications
You must be signed in to change notification settings - Fork 8
/
action.yml
61 lines (61 loc) · 1.8 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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
name: tfmermaid
author: asannou
description: Convert an output of Terraform graph to Mermaid's syntax.
branding:
icon: filter
color: purple
inputs:
file:
description: |
Name of the file in which the converted output is embedded. This file must contain the following target code blocks:
~~~
```mermaid
%%tfmermaid
```
~~~
default: README.md
label:
description: |
Label to identify the target code block, for example:
~~~
```mermaid
%%tfmermaid:label
```
~~~
default: ""
orientation:
description: See [Flowchart Orientation](https://mermaid-js.github.io/mermaid/#/flowchart?id=flowchart-orientation).
default: LR
arrow-direction:
description: Direction of arrows, e.g. `forward` or `reverse`.
default: reverse
arrow-length:
description: Length of arrows linked to `var` or `output`.
default: 2
include:
description: Comma-separated names of included types, e.g. `provider`.
default: ""
exclude:
description: Comma-separated names of excluded types, e.g. `var,local,output,data,_orphan`. `_orphan` means unlinked node.
default: ""
working-directory:
description: Working directory.
default: ./
runs:
using: composite
steps:
- uses: actions/setup-node@v3
with:
node-version: 18
- uses: hashicorp/setup-terraform@v2
with:
terraform_wrapper: false
- run: ${{ github.action_path }}/convert.sh ${{ inputs.file }} ${{ inputs.label }}
env:
ORIENTATION: ${{ inputs.orientation }}
ARROW_DIRECTION: ${{ inputs.arrow-direction }}
ARROW_LENGTH: ${{ inputs.arrow-length }}
INCLUDE: ${{ inputs.include }}
EXCLUDE: ${{ inputs.exclude }}
shell: bash
working-directory: ${{ inputs.working-directory }}