From 7ebca4c910dd90d6ece82abffdf3678b0dea1ba4 Mon Sep 17 00:00:00 2001 From: Matthew Anderson Date: Wed, 10 Feb 2021 12:49:15 -0600 Subject: [PATCH] Fix yq docker in release workflow (#6) * fix: upgrade yq to v4 * fix: handle spaces in paths * fix: update yq in release workflow --- .github/workflows/release.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index b66d3d7..1d46e17 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -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