File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 4343 type : string
4444 required : false
4545 default : ' ubuntu-latest'
46+ custom_structure_repository :
47+ description : ' Path to the custom structures repository'
48+ type : string
49+ required : false
50+ default : ' '
4651 secrets :
4752 token :
4853 description : ' GitHub token'
@@ -65,11 +70,33 @@ jobs:
6570 pip install git+https://github.com/httpdss/struct.git
6671 struct -h
6772
73+ - name : Install custom structures
74+ if : ${{ inputs.custom_structure_repository != '' }}
75+ uses : actions/checkout@v4
76+ with :
77+ repository : ${{ inputs.custom_structure_repository }}
78+ token : ${{ secrets.token }}
79+ path : ./custom-structures
80+
6881 - name : Run STRUCT
6982 run : |
70- struct generate ${{ inputs.args }} \
71- ${{ inputs.struct_file }} \
72- ${{ inputs.output_dir }}
83+ if [ -d ./custom-structures ]; then
84+
85+ struct list \
86+ -s ./custom-structures
87+
88+ struct generate \
89+ -s ./custom-structures \
90+ ${{ inputs.args }} \
91+ ${{ inputs.struct_file }} \
92+ ${{ inputs.output_dir }} \
93+ else
94+ struct list
95+
96+ struct generate ${{ inputs.args }} \
97+ ${{ inputs.struct_file }} \
98+ ${{ inputs.output_dir }}
99+ fi
73100
74101 - name : Generate PR with changes
75102 if : github.event_name == 'workflow_dispatch'
You can’t perform that action at this time.
0 commit comments