File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change 36
36
# Group the output by platform.
37
37
CHECK_RUNS=$(gh api "repos/$GITHUB_REPOSITORY/commits/$GITHUB_SHA/check-runs" --paginate)
38
38
echo "checks..."
39
- FILTERED=$(echo "$CHECK_RUNS" | jq -r '.check_runs[] | select(.name | endswith("-env")) | { "config": .name, "build_path": .output.text }')
39
+ FILTERED=$(jq -c - r '.check_runs[] | select(.name | endswith("-env")) | { "config": .name, "build_path": .output.text }' <<< "$CHECK_RUNS" )
40
40
echo "filtered..."
41
- GROUPS=$(echo "$FILTERED" | jq --slurp -c -r '. as $jobs | map(.config | split(".") | first) | unique | map(. as $group | {"platform": $group, "jobs": $jobs | map(select(.config |startswith($group)))})')
41
+ GROUPS=$(jq --slurp -c -r '. as $jobs | map(.config | split(".") | first) | unique | map(. as $group | {"platform": $group, "jobs": $jobs | map(select(.config |startswith($group)))})' <<< "$FILTERED" )
42
42
echo "groups..."
43
43
if jq -e . <<< "$GROUPS" > /dev/null 2>&1; then # JSON validation
44
44
echo "Valid JSON"
You can’t perform that action at this time.
0 commit comments