File tree Expand file tree Collapse file tree 1 file changed +35
-1
lines changed Expand file tree Collapse file tree 1 file changed +35
-1
lines changed Original file line number Diff line number Diff line change 18
18
steps :
19
19
- uses : actions/setup-python@v2
20
20
- name : Install JSON tools
21
- run : pip3 install jsonpatch json2yaml
21
+ run : pip3 install jsonpatch pyyaml
22
+ - name : Build yaml2json, json2yaml
23
+ run : ' mkdir -p ~/bin
24
+
25
+ cat - << EOF > ~/bin/json2yaml
26
+
27
+ #!/usr/bin/env python3
28
+
29
+ import json
30
+
31
+ import sys
32
+
33
+ import yaml
34
+
35
+ sys.stdout.write(yaml.dump(json.load(sys.stdin),sort_keys=False))
36
+
37
+ EOF
38
+
39
+ cat - << EOF > ~/bin/yaml2json
40
+
41
+ #!/usr/bin/env python3
42
+
43
+ import json
44
+
45
+ import sys
46
+
47
+ import yaml
48
+
49
+ json.dump(yaml.full_load(sys.stdin),sys.stdout)
50
+
51
+ EOF
52
+
53
+ chmod +x ~/bin/json2yaml ~/bin/yaml2json
54
+
55
+ '
22
56
- name : Check out this repo
23
57
uses : actions/checkout@v2
24
58
with :
You can’t perform that action at this time.
0 commit comments