Skip to content

Commit

Permalink
docs(README): inputs and outputs
Browse files Browse the repository at this point in the history
  • Loading branch information
gr2m committed Jun 1, 2023
1 parent 9051a11 commit 2b45f15
Showing 1 changed file with 14 additions and 4 deletions.
18 changes: 14 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,28 @@ jobs:
runs-on: ubuntu-latest
steps:
- id: filter-release-changelogs
uses: primer/filter-release-changelogs-action@v1
uses: gr2m/primer-release-filter-action@v1
with:
components: ActionList, ActionMenu

- if: ${{ needs.filter.outputs.hasComponentChanges }}
# example release payload for reference:
# https://github.com/octokit/webhooks/blob/70fafcfab3a6d54e45f3a2a8370c809fe9ee28c0/payload-examples/api.github.com/release/created.payload.json
run: |
# example release payload for reference:
# https://github.com/octokit/webhooks/blob/70fafcfab3a6d54e45f3a2a8370c809fe9ee28c0/payload-examples/api.github.com/release/created.payload.json
echo ${{ github.event.client_payload.release.tag_name }}
echo ${{ steps.filter-release-changelogs.outputs.componentChangelogs }}
echo ${{ steps.filter-release-changelogs.outputs.changelogsByComponentMarkdown }}
```

### Inputs

The only supported input is `components`. Pass the names of the components you are interested in separated by comma. For `primer/react`, find the names [here](https://github.com/primer/react/blob/main/generated/components.json). For `primer/view_components` find the names (`id`s) [here](https://primer.github.io/view_components/components.json).

### Outputs

- `hasComponentChanges` set to `"true"` or undefined
- `changelogsByComponent` set to a JSON string of `{[componentName]: changelogsString}`, based on the `components` input
- `changelogsByComponentMarkdown` set to a a markdown string of changelogs grouped by component, based on the `components` input

## License

[MIT](LICENSE)

0 comments on commit 2b45f15

Please sign in to comment.