-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: support action name attribute (#526)
* GH-240 update CONTRIBUTING where command does not work and add additional helper scripts * GH-240 add option to have a top level header containing the name * GH-240 add header to readme and tests * GH-240 update name header shorthand to nh * GH-240 update name header shorthand to n --------- Co-authored-by: Niek Palm <npalm@users.noreply.github.com>
- Loading branch information
1 parent
2147d09
commit 0e99848
Showing
9 changed files
with
258 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,74 @@ | ||
<!-- action-docs-header action="__tests__/fixtures/all_fields_action.yml" --> | ||
## An Action | ||
<!-- action-docs-header action="__tests__/fixtures/all_fields_action.yml" --> | ||
|
||
<!-- action-docs-description action="__tests__/fixtures/all_fields_action.yml" --> | ||
### Description | ||
|
||
Default test | ||
<!-- action-docs-description action="__tests__/fixtures/all_fields_action.yml" --> | ||
|
||
<!-- action-docs-usage action="__tests__/fixtures/all_fields_action.yml" project="npalm/action-docs" version="v1" --> | ||
### Usage | ||
|
||
```yaml | ||
- uses: npalm/action-docs@v1 | ||
with: | ||
inputA: | ||
# A description A | ||
# | ||
# Required: false | ||
# Default: "" | ||
|
||
inputB: | ||
# A description B | ||
# | ||
# Required: true | ||
# Default: "" | ||
|
||
inputC: | ||
# A description C | ||
# | ||
# Required: true | ||
# Default: C | ||
|
||
inputD: | ||
# A description D | ||
# | ||
# Required: false | ||
# Default: D | ||
|
||
inputE: | ||
# A description E | ||
# | ||
# 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" --> | ||
### 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/all_fields_action.yml" --> | ||
|
||
<!-- action-docs-outputs action="__tests__/fixtures/all_fields_action.yml" --> | ||
### Outputs | ||
|
||
| name | description | | ||
| --- | --- | | ||
| `outputA` | <p>A description A</p> | | ||
| `outputB` | <p>A description B</p> | | ||
<!-- action-docs-outputs action="__tests__/fixtures/all_fields_action.yml" --> | ||
|
||
<!-- action-docs-runs action="__tests__/fixtures/all_fields_action.yml" --> | ||
### Runs | ||
|
||
This action is a `node12` action. | ||
<!-- action-docs-runs action="__tests__/fixtures/all_fields_action.yml" --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
<!-- action-docs-header action="__tests__/fixtures/all_fields_action.yml" --> | ||
# Test Action | ||
<!-- action-docs-header action="__tests__/fixtures/all_fields_action.yml" --> | ||
|
||
<!-- action-docs-description action="__tests__/fixtures/all_fields_action.yml" --> | ||
## Description | ||
|
||
Default test | ||
<!-- action-docs-description action="__tests__/fixtures/all_fields_action.yml" --> | ||
|
||
<!-- action-docs-usage action="__tests__/fixtures/all_fields_action.yml" project="npalm/action-docs" version="v1" --> | ||
## Usage | ||
|
||
```yaml | ||
- uses: npalm/action-docs@v1 | ||
with: | ||
inputA: | ||
# A description A | ||
# | ||
# Required: false | ||
# Default: "" | ||
|
||
inputB: | ||
# A description B | ||
# | ||
# Required: true | ||
# Default: "" | ||
|
||
inputC: | ||
# A description C | ||
# | ||
# Required: true | ||
# Default: C | ||
|
||
inputD: | ||
# A description D | ||
# | ||
# Required: false | ||
# Default: D | ||
|
||
inputE: | ||
# A description E | ||
# | ||
# 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" --> | ||
## 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/all_fields_action.yml" --> | ||
|
||
<!-- action-docs-outputs action="__tests__/fixtures/all_fields_action.yml" --> | ||
## Outputs | ||
|
||
| name | description | | ||
| --- | --- | | ||
| `outputA` | <p>A description A</p> | | ||
| `outputB` | <p>A description B</p> | | ||
<!-- action-docs-outputs action="__tests__/fixtures/all_fields_action.yml" --> | ||
|
||
<!-- action-docs-runs action="__tests__/fixtures/all_fields_action.yml" --> | ||
## Runs | ||
|
||
This action is a `node12` action. | ||
<!-- action-docs-runs action="__tests__/fixtures/all_fields_action.yml" --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
## An Action | ||
|
||
### Description | ||
|
||
Default test | ||
|
||
### Inputs | ||
|
||
| name | description | 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> | `false` | `test` | | ||
| `inputB` | <p>This is a multiline description</p> | `false` | `test` | | ||
|
||
|
||
### Outputs | ||
|
||
| name | description | | ||
| --- | --- | | ||
| `outputA` | <p>A description</p> | | ||
|
||
|
||
### Runs | ||
|
||
This action is a `node12` action. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.