Skip to content

Commit

Permalink
convert yaml.
Browse files Browse the repository at this point in the history
  • Loading branch information
dojyorin committed Sep 29, 2023
1 parent 5a6f512 commit 3a56908
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions .github/workflows/to_yaml.sh
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
#!/bin/sh
set -eu

while [[ ${#} -ge 1 ]]; do
if [[ -f ./${1}.json ]]; then
yq -I 4 -o y ./${1}.json | head -c -1 > ./${1}.yaml
fi
cd ${0%/*}

shift
done
for _v in $(find ./ -maxdepth 1 -type f -name '*.json'); do
yq -I 4 -o y ${_v} | head -c -1 > ${_v%.*}.yaml
done; unset _v

0 comments on commit 3a56908

Please sign in to comment.