File tree Expand file tree Collapse file tree 1 file changed +7
-14
lines changed Expand file tree Collapse file tree 1 file changed +7
-14
lines changed Original file line number Diff line number Diff line change @@ -87,21 +87,14 @@ jobs:
87
87
- name : Update resource gallery
88
88
shell : python
89
89
run : |
90
+ import yaml
90
91
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)
98
-
99
- with open(resource_gallery_file) as f:
100
- resource_gallery = yaml.load(f)
101
-
102
- with open(resource_gallery_file, 'w') as f:
103
- resource_gallery.append(data)
104
- yaml.dump(resource_gallery, f)
92
+
93
+ with open(submission_file, 'r') as file:
94
+ data = json.load(file)
95
+
96
+ with open(resource_gallery_file, 'w') as yaml_file:
97
+ yaml.dump(data, yaml_file)
105
98
106
99
- name : Run pre-commit hooks
107
100
run : |
You can’t perform that action at this time.
0 commit comments