Skip to content

Commit 2c66429

Browse files
authored
Update main.yml (#203)
1 parent 7a78029 commit 2c66429

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

.github/workflows/main.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,9 @@ jobs:
3636
# Group the output by platform.
3737
CHECK_RUNS=$(gh api "repos/$GITHUB_REPOSITORY/commits/$GITHUB_SHA/check-runs" --paginate)
3838
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")
4040
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")
4242
echo "groups..."
4343
if jq -e . <<< "$GROUPS" > /dev/null 2>&1; then # JSON validation
4444
echo "Valid JSON"

0 commit comments

Comments
 (0)