Sets useful component info for other actions to use
Input Schema
| Property | Type | Description | Required |
|---|---|---|---|
| componentName | string | - |
Output Schema
| Property | Type | Description | Required |
|---|---|---|---|
| kebabCaseComponentName | string | - |
Usage Examples
Generate a kebab-case component ID and use it to scaffold into a named directory
This example converts the provided component name to kebab-case, then uses it to set the target directory and template values. Use this when you want consistent directory and ID naming. It pairs well with fetch:template.
steps:
- id: componentInfo
action: harmonix:get-component-info
input:
componentName: ${{ parameters.componentName }}
- id: fetchBase
action: fetch:template
input:
url: ./skeleton
targetPath: ./services/${{ steps.componentInfo.output.kebabCaseComponentName }}
values:
componentName: ${{ parameters.componentName }}
component_id: ${{ steps.componentInfo.output.kebabCaseComponentName }}
owner: ${{ parameters.owner }}
description: ${{ parameters.description }}Build a kebab-case name from multiple inputs for package and image naming
This example composes the component name from system and service inputs, then uses the kebab-case output for package and image names. Use this when you want a consistent naming pattern across packages and container images. It follows with fetch:template.
steps:
- id: compInfo
action: harmonix:get-component-info
input:
componentName: "${{ parameters.system }}-${{ parameters.serviceName }}"
- id: materialize
action: fetch:template
input:
url: ./node-service-template
targetPath: ./services/${{ steps.compInfo.output.kebabCaseComponentName }}
values:
serviceName: ${{ parameters.serviceName }}
system: ${{ parameters.system }}
packageName: "@acme/${{ steps.compInfo.output.kebabCaseComponentName }}"
imageName: "ghcr.io/acme/${{ steps.compInfo.output.kebabCaseComponentName }}:latest"
component_id: ${{ steps.compInfo.output.kebabCaseComponentName }}