Skip to content

Commit 8168e00

Browse files
Update workflows from templates. (#72)
1 parent 75f02ab commit 8168e00

File tree

1 file changed

+35
-1
lines changed

1 file changed

+35
-1
lines changed

.github/workflows/update-workflows.yaml

Lines changed: 35 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,41 @@ jobs:
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:

0 commit comments

Comments
 (0)