Fix CI changes detection: build JSON array without jq
This commit is contained in:
@@ -28,13 +28,13 @@ jobs:
|
|||||||
else
|
else
|
||||||
CHANGED=$(git diff --name-only HEAD~1)
|
CHANGED=$(git diff --name-only HEAD~1)
|
||||||
fi
|
fi
|
||||||
APPS="[]"
|
APPS=""
|
||||||
for app in web api harness; do
|
for app in web api harness; do
|
||||||
if echo "$CHANGED" | grep -qE "^(apps/${app}/|packages/)"; then
|
if echo "$CHANGED" | grep -qE "^(apps/${app}/|packages/)"; then
|
||||||
APPS=$(echo "$APPS" | jq -c ". + [\"${app}\"]")
|
APPS="${APPS:+$APPS,}\"${app}\""
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
echo "apps=$APPS" >> "$GITHUB_OUTPUT"
|
echo "apps=[${APPS}]" >> "$GITHUB_OUTPUT"
|
||||||
|
|
||||||
lint-and-test:
|
lint-and-test:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|||||||
Reference in New Issue
Block a user