Skip to content
This repository was archived by the owner on Feb 12, 2025. It is now read-only.

Commit c648dd3

Browse files
authored
feat!: use latest generator rc release in the action (#8)
1 parent 199fbf9 commit c648dd3

File tree

8 files changed

+74015
-59026
lines changed

8 files changed

+74015
-59026
lines changed

README.md

Lines changed: 15 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ This action generates whatever you want using your AsyncAPI document. It uses [A
66

77
### `template`
88

9-
Template for the generator. Official templates are listed here https://github.com/search?q=topic%3Aasyncapi+topic%3Agenerator+topic%3Atemplate. You can pass template as npm package, url to git repository, link to tar file or local template.
9+
Template for the generator. Official templates are listed here https://github.com/asyncapi/generator#list-of-official-generator-templates. You can pass template as npm package, url to git repository, link to tar file or local template.
1010

11-
**Default** points to `@asyncapi/markdown-template@0.3.0` template.
11+
**Default** points to `@asyncapi/markdown-template@0.10.0` template.
1212

1313
> We recommend to always specify the version of the template to not encounter any issues with the action in case of release of the template that is not compatible with given version of the generator.
1414
@@ -28,55 +28,36 @@ Directory where to put the generated files.
2828

2929
**Default** points to `output` directory in the working directory.
3030

31-
## Outputs
32-
33-
### `files`
34-
35-
List of generated files.
36-
3731
## Example usage
3832

3933
### Basic
4034

4135
In case all defaults are fine for you, just add such step:
4236

43-
```
37+
```yaml
4438
- name: Generating Markdown from my AsyncAPI document
45-
uses: asyncapi/github-action-for-generator@v0.2.0
39+
uses: asyncapi/github-action-for-generator@v1
4640
```
4741
4842
### Using all possible inputs
4943
5044
In case you do not want to use defaults, you for example want to use different template:
5145
52-
```
46+
```yaml
5347
- name: Generating HTML from my AsyncAPI document
54-
uses: asyncapi/github-action-for-generator@v0.2.0
48+
uses: asyncapi/github-action-for-generator@v1
5549
with:
56-
template: '@asyncapi/html-template@0.3.0' #In case of template from npm, because of @ it must be in quotes
50+
template: '@asyncapi/html-template@0.15.4' #In case of template from npm, because of @ it must be in quotes
5751
filepath: docs/api/my-asyncapi.yml
5852
parameters: baseHref=/test-experiment/ sidebarOrganization=byTags #space separated list of key/values
5953
output: generated-html
6054
```
6155
62-
### Accessing output of generation step
63-
64-
In case you want to have more steps in your workflow after generation and you need to know what files were exactly generated, you can access this information as shown below:
65-
66-
```
67-
- name: Generating Markdown from my AsyncAPI document
68-
id: generation
69-
uses: asyncapi/[email protected]
70-
- name: Another step where I want to know what files were generated so I can pass it to another step and process them forward if needed
71-
run: echo '${{steps.generation.outputs.files}}'
72-
```
73-
7456
### Example workflow with publishing generated HTML to GitHub Pages
7557
7658
In case you want to validate your asyncapi file first, and also send generated HTML to GitHub Pages this is how full workflow could look like:
7759
78-
```
79-
60+
```yaml
8061
name: AsyncAPI documents processing
8162

8263
on:
@@ -93,15 +74,15 @@ jobs:
9374

9475
#Using another action for AsyncAPI for validation
9576
- name: Validating AsyncAPI document
96-
uses: WaleedAshraf/asyncapi-github-action@v0.0.3
77+
uses: WaleedAshraf/asyncapi-github-action@v1
9778
with:
9879
filepath: docs/api/my-asyncapi.yml
9980

10081
#In case you do not want to use defaults, you for example want to use different template
10182
- name: Generating HTML from my AsyncAPI document
102-
uses: asyncapi/github-action-for-generator@v0.2.0
83+
uses: asyncapi/github-action-for-generator@v1
10384
with:
104-
template: '@asyncapi/html-template@0.3.0' #In case of template from npm, because of @ it must be in quotes
85+
template: '@asyncapi/html-template@0.9.0' #In case of template from npm, because of @ it must be in quotes
10586
filepath: docs/api/my-asyncapi.yml
10687
parameters: baseHref=/test-experiment/ sidebarOrganization=byTags #space separated list of key/values
10788
output: generated-html
@@ -114,3 +95,7 @@ jobs:
11495
BRANCH: gh-pages
11596
FOLDER: generated-html
11697
```
98+
99+
## Troubleshooting
100+
101+
You can enable more log information in GitHub Action by adding `ACTIONS_STEP_DEBUG` secret to repository where you want to use this action. Set the value of this secret to `true` and you''ll notice more debug logs from this action.

action.yml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ description: 'Use this action to generate docs or code from your AsyncAPI docume
33
inputs:
44
template:
55
description: 'Template for the generator. Official templates are listed here https://github.com/search?q=topic%3Aasyncapi+topic%3Agenerator+topic%3Atemplate. You can pass template as npm package, url to git repository, link to tar file or local template.'
6-
default: '@asyncapi/markdown-template'
6+
default: '@asyncapi/markdown-template@0.10.0'
77
required: false
88
filepath:
99
description: 'Location of the AsyncAPI document.'
@@ -16,9 +16,6 @@ inputs:
1616
description: 'Directory where to put the generated files.'
1717
required: false
1818
default: 'output'
19-
outputs:
20-
files:
21-
description: 'List of generated files.'
2219
runs:
2320
using: 'node12'
2421
main: 'dist/index.js'

dist/fsevents.node

0 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)