Skip to content

Commit 594edab

Browse files
authored
Merge pull request #10 from compas-dev/action_prefix
added prefix input to action.yml
2 parents ad34933 + a9bd354 commit 594edab

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

action.yml

+12-1
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,23 @@ inputs:
77
target:
88
description: 'Target directory for ghuser files'
99
required: true
10+
prefix:
11+
description: 'Add this prefix to the name of each generated component'
12+
required: false
1013
runs:
1114
using: 'composite'
1215
steps:
1316
- run: nuget install Grasshopper -OutputDirectory ./lib -source https://api.nuget.org/v3/index.json
1417
shell: pwsh
15-
- run: ipy ${{ github.action_path }}/componentize.py ${{ inputs.source }} ${{ inputs.target }} --ghio ./lib
18+
- run: |
19+
$command="ipy"
20+
$params="${{ github.action_path }}/componentize.py", "${{ inputs.source }}", "${{ inputs.target }}", "--ghio", "./lib"
21+
$prefix="${{ inputs.prefix }}"
22+
if( $prefix )
23+
{
24+
$params=$params + "--prefix", "$prefix"
25+
}
26+
& $command $params
1627
shell: pwsh
1728
branding:
1829
icon: 'box'

0 commit comments

Comments
 (0)