Skip to content

Commit

Permalink
GH-240 ability to display workflow inputs and outputs
Browse files Browse the repository at this point in the history
  • Loading branch information
larmitage-bjss committed Feb 14, 2024
1 parent 8df7c09 commit ef810cc
Show file tree
Hide file tree
Showing 7 changed files with 152 additions and 99 deletions.
14 changes: 7 additions & 7 deletions __tests__/fixtures/action/all_fields_readme.input.crlf
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<!-- action-docs-description action="__tests__/fixtures/action/all_fields_action.yml.crlf" -->

<!-- action-docs-inputs action="__tests__/fixtures/action/all_fields_action.yml.crlf" -->

<!-- action-docs-outputs action="__tests__/fixtures/action/all_fields_action.yml.crlf" -->

<!-- action-docs-runs action="__tests__/fixtures/action/all_fields_action.yml.crlf" -->
<!-- action-docs-description action="__tests__/fixtures/action/all_fields_action.yml.crlf" -->
<!-- action-docs-inputs action="__tests__/fixtures/action/all_fields_action.yml.crlf" -->
<!-- action-docs-outputs action="__tests__/fixtures/action/all_fields_action.yml.crlf" -->
<!-- action-docs-runs action="__tests__/fixtures/action/all_fields_action.yml.crlf" -->
64 changes: 32 additions & 32 deletions __tests__/fixtures/action/all_fields_readme.output.crlf
Original file line number Diff line number Diff line change
@@ -1,32 +1,32 @@
<!-- action-docs-description action="__tests__/fixtures/action/all_fields_action.yml.crlf" -->
## Description

Default test
<!-- action-docs-description action="__tests__/fixtures/action/all_fields_action.yml.crlf" -->

<!-- action-docs-inputs action="__tests__/fixtures/action/all_fields_action.yml.crlf" -->
## Inputs

| name | description | required | default |
| --- | --- | --- | --- |
| `inputA` | <p>A description A</p> | `false` | `""` |
| `inputB` | <p>A description B</p> | `true` | `""` |
| `inputC` | <p>A description C</p> | `true` | `C` |
| `inputD` | <p>A description D</p> | `false` | `D` |
| `inputE` | <p>A description E</p> | `false` | `false` |
<!-- action-docs-inputs action="__tests__/fixtures/action/all_fields_action.yml.crlf" -->

<!-- action-docs-outputs action="__tests__/fixtures/action/all_fields_action.yml.crlf" -->
## Outputs

| name | description |
| --- | --- |
| `outputA` | <p>A description A</p> |
| `outputB` | <p>A description B</p> |
<!-- action-docs-outputs action="__tests__/fixtures/action/all_fields_action.yml.crlf" -->

<!-- action-docs-runs action="__tests__/fixtures/action/all_fields_action.yml.crlf" -->
## Runs

This action is a `node12` action.
<!-- action-docs-runs action="__tests__/fixtures/action/all_fields_action.yml.crlf" -->
<!-- action-docs-description action="__tests__/fixtures/action/all_fields_action.yml.crlf" -->
## Description
Default test
<!-- action-docs-description action="__tests__/fixtures/action/all_fields_action.yml.crlf" -->
<!-- action-docs-inputs action="__tests__/fixtures/action/all_fields_action.yml.crlf" -->
## Inputs
| name | description | required | default |
| --- | --- | --- | --- |
| `inputA` | <p>A description A</p> | `false` | `""` |
| `inputB` | <p>A description B</p> | `true` | `""` |
| `inputC` | <p>A description C</p> | `true` | `C` |
| `inputD` | <p>A description D</p> | `false` | `D` |
| `inputE` | <p>A description E</p> | `false` | `false` |
<!-- action-docs-inputs action="__tests__/fixtures/action/all_fields_action.yml.crlf" -->
<!-- action-docs-outputs action="__tests__/fixtures/action/all_fields_action.yml.crlf" -->
## Outputs
| name | description |
| --- | --- |
| `outputA` | <p>A description A</p> |
| `outputB` | <p>A description B</p> |
<!-- action-docs-outputs action="__tests__/fixtures/action/all_fields_action.yml.crlf" -->
<!-- action-docs-runs action="__tests__/fixtures/action/all_fields_action.yml.crlf" -->
## Runs
This action is a `node12` action.
<!-- action-docs-runs action="__tests__/fixtures/action/all_fields_action.yml.crlf" -->
2 changes: 2 additions & 0 deletions __tests__/fixtures/action/all_fields_readme_header.output
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ Default test
# Required: false
# Default: false
```


<!-- action-docs-usage action="__tests__/fixtures/all_fields_action.yml" project="npalm/action-docs" version="v1" -->

<!-- action-docs-inputs action="__tests__/fixtures/all_fields_action.yml" -->
Expand Down
1 change: 1 addition & 0 deletions __tests__/fixtures/action/default-with-header.output
Original file line number Diff line number Diff line change
Expand Up @@ -47,3 +47,4 @@ This action is a `node12` action.
# Default: test
```


5 changes: 3 additions & 2 deletions __tests__/fixtures/workflow/default.output
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
### Inputs

| name | description | type | required | default |
| --- | --- | --- | --- |
| --- | --- | --- | --- | --- |
| `inputA` | <ul> <li>Item 1<ul> <li>foo, bar, baz</li></ul></li> <li>Item 2<ul> <li><a href="https://github.com/">github</a></li> <li><strong>blah</strong></li></ul></li> <li>Item 3</li> </ul> | `string` | `false` | `This is a default` |
| `inputB` | <p>This is a multiline description</p> | `number` | `true` | |
| `inputB` | <p>This is a multiline description</p> | `number` | `true` | `""` |


### Outputs
Expand All @@ -14,3 +14,4 @@
| --- | --- |
| `outputA` | <p>This is output A</p> |


2 changes: 1 addition & 1 deletion __tests__/fixtures/workflow/workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ on:
type: string
default: 'This is a default'
required: false
InputB:
inputB:
description: |
This is a
multiline description
Expand Down
Loading

0 comments on commit ef810cc

Please sign in to comment.