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