From f89cad74d97feab7ed33cc9c0b3ac044a0f57eab Mon Sep 17 00:00:00 2001 From: ertrzyiks Date: Fri, 27 Oct 2023 21:34:30 +0200 Subject: [PATCH] Fix --- .github/workflows/snapshot.yml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/snapshot.yml b/.github/workflows/snapshot.yml index 79f147a..25580d4 100644 --- a/.github/workflows/snapshot.yml +++ b/.github/workflows/snapshot.yml @@ -60,11 +60,16 @@ jobs: for filename in `git ls-files --modified | grep package.json`; do cat "$filename" | jq -r '.name + "@" + .version' done - echo "\n" } + relevantPackages () { + listChangedPackages | grep $SHA + } + + RELEVANT_PACKAGES=$(relevantPackages) + echo 'LIST<> $GITHUB_OUTPUT - listChangedPackages | grep $SHA >> $GITHUB_OUTPUT + [ -z "$RELEVANT_PACKAGES" ] && echo "" || echo "$RELEVANT_PACKAGES" >> $GITHUB_OUTPUT echo 'EOF' >> $GITHUB_OUTPUT echo "NUMBER_OF_PACKAGES=$(git ls-files --modified | grep package.json | wc -l)" >> $GITHUB_OUTPUT env: