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 1818 steps :
1919 - uses : actions/setup-python@v2
2020 - 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+ '
2256 - name : Check out this repo
2357 uses : actions/checkout@v2
2458 with :
You can’t perform that action at this time.
0 commit comments