We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b3c1df0 commit 844b2d9Copy full SHA for 844b2d9
.github/workflows/update-resource-gallery.yaml
@@ -87,21 +87,14 @@ jobs:
87
- name: Update resource gallery
88
shell: python
89
run: |
90
+ import yaml
91
import json
- 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)
+
+ with open(submission_file, 'r') as file:
+ data = json.load(file)
+ with open(resource_gallery_file, 'w') as yaml_file:
+ yaml.dump(data, yaml_file)
105
106
- name: Run pre-commit hooks
107
0 commit comments