File tree Expand file tree Collapse file tree 1 file changed +6
-12
lines changed Expand file tree Collapse file tree 1 file changed +6
-12
lines changed Original file line number Diff line number Diff line change 55 types :
66 - opened
77 - edited
8+
89jobs :
910 validate-user-submission :
1011 if : |
@@ -87,21 +88,14 @@ jobs:
8788 - name : Update resource gallery
8889 shell : python
8990 run : |
91+ import yaml
9092 import json
91- from ruamel.yaml import YAML
92-
93- yaml = YAML()
94- submission_file = 'resource-gallery-submission-input.json'
95- resource_gallery_file = 'portal/resource_gallery.yaml'
96- with open(submission_file) as f:
97- data = json.load(f)
9893
99- with open(resource_gallery_file ) as f :
100- resource_gallery = yaml .load(f )
94+ with open(submission_file, 'r' ) as file :
95+ data = json .load(file )
10196
102- with open(resource_gallery_file, 'w') as f:
103- resource_gallery.append(data)
104- yaml.dump(resource_gallery, f)
97+ with open(resource_gallery_file, 'w') as yaml_file:
98+ yaml.dump(data, yaml_file)
10599
106100 - name : Run pre-commit hooks
107101 run : |
You can’t perform that action at this time.
0 commit comments