File tree Expand file tree Collapse file tree 1 file changed +16
-5
lines changed
Expand file tree Collapse file tree 1 file changed +16
-5
lines changed Original file line number Diff line number Diff line change 1313 - registry.yaml
1414 workflow_dispatch :
1515 inputs :
16- reset :
17- description : Space-separated paths to remove from schema before running an update
16+ reset-registry :
17+ description : Space-separated source keys to remove from registry.yaml
18+ default : " "
19+ type : string
20+ reset-paths :
21+ description : Space-separated directories to remove from schema and definitions
1822 default : " "
1923 type : string
2024
@@ -40,15 +44,22 @@ jobs:
4044 with :
4145 go-version-file : go.mod
4246
47+ - name : Optionally reset source registry
48+ if : github.event_name == 'workflow_dispatch' && github.event.inputs.reset-registry != ''
49+ run : |
50+ for key in ${{ github.event.inputs.reset-registry }}; do
51+ yq "del(.sources[\"$key\"])" registry.yaml -i || true
52+ done
53+
4354 - name : Optionally remove paths
44- if : github.event_name == 'workflow_dispatch' && github.event.inputs.reset != ''
55+ if : github.event_name == 'workflow_dispatch' && github.event.inputs.reset-paths != ''
4556 run : |
4657 cd schema
47- rm -rf ${{ github.event.inputs.reset }} || true
58+ rm -rf ${{ github.event.inputs.reset-paths }} || true
4859 cd -
4960
5061 cd definitions
51- rm -rf ${{ github.event.inputs.reset }} || true
62+ rm -rf ${{ github.event.inputs.reset-paths }} || true
5263 cd -
5364
5465 - name : Create token
You can’t perform that action at this time.
0 commit comments