Skip to content

Commit

Permalink
Fix yq docker in release workflow (#6)
Browse files Browse the repository at this point in the history
* fix: upgrade yq to v4

* fix: handle spaces in paths

* fix: update yq in release workflow
  • Loading branch information
maxb2 authored Feb 10, 2021
1 parent 8d8afcf commit 7ebca4c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@ jobs:
run: |
set -x
yq() {
docker run --rm -i -v "${PWD}":/workdir mikefarah/yq yq "$@"
docker run --rm -i -v "${PWD}":/workdir mikefarah/yq:latest "$@"
}
mkdir -p zip
for foo in $(yq r --printMode p documents.yml notes.*.*)
for foo in $(yq e '.notes.*.* | path | join(".")' documents.yml) # enumerate yaml paths
do
export SRC=$(yq r documents.yml $foo.path)
export DEST="$PWD/zip/$(yq r documents.yml $foo.zip)"
export SRC=$(yq e ".$foo.path" documents.yml)
export DEST="$PWD/zip/$(yq e ".$foo.zip" documents.yml)"
(cd "$SRC" && zip -r "$DEST" .)
done
Expand Down

0 comments on commit 7ebca4c

Please sign in to comment.