Skip to content

Commit 7ebca4c

Browse files
authored
Fix yq docker in release workflow (#6)
* fix: upgrade yq to v4 * fix: handle spaces in paths * fix: update yq in release workflow
1 parent 8d8afcf commit 7ebca4c

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

.github/workflows/release.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,13 @@ jobs:
1818
run: |
1919
set -x
2020
yq() {
21-
docker run --rm -i -v "${PWD}":/workdir mikefarah/yq yq "$@"
21+
docker run --rm -i -v "${PWD}":/workdir mikefarah/yq:latest "$@"
2222
}
2323
mkdir -p zip
24-
for foo in $(yq r --printMode p documents.yml notes.*.*)
24+
for foo in $(yq e '.notes.*.* | path | join(".")' documents.yml) # enumerate yaml paths
2525
do
26-
export SRC=$(yq r documents.yml $foo.path)
27-
export DEST="$PWD/zip/$(yq r documents.yml $foo.zip)"
26+
export SRC=$(yq e ".$foo.path" documents.yml)
27+
export DEST="$PWD/zip/$(yq e ".$foo.zip" documents.yml)"
2828
(cd "$SRC" && zip -r "$DEST" .)
2929
done
3030

0 commit comments

Comments
 (0)