Skip to content

Commit 099f638

Browse files
authored
Update main.yml
1 parent 5deb3ff commit 099f638

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

.github/workflows/main.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,12 @@ jobs:
3737
./jq --version
3838
CHECK_RUNS=$(gh api "repos/$GITHUB_REPOSITORY/commits/main/check-runs" --paginate)
3939
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")
4141
echo "filtered..."
4242
./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")
4446
echo "groups..."
4547
if ./jq -e . <<< "$GROUPS" > /dev/null 2>&1; then # JSON validation
4648
echo "Valid JSON"

0 commit comments

Comments
 (0)