Skip to content

Commit 5deb3ff

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

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

.github/workflows/main.yml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,15 +32,17 @@ jobs:
3232
id: set-matrix
3333
run: |
3434
# Group the output by platform.
35-
jq --version
35+
curl -L https://github.com/jqlang/jq/releases/download/jq-1.7.1/jq-linux64 -o jq
36+
chmod +x jq
37+
./jq --version
3638
CHECK_RUNS=$(gh api "repos/$GITHUB_REPOSITORY/commits/main/check-runs" --paginate)
3739
echo "checks..."
38-
FILTERED=$(jq -c -r '.check_runs[] | select(.name | endswith("-env")) | { "config": .name, "build_path": .output.text }' <<< "$CHECK_RUNS")
40+
FILTERED=$(./jq -c -r '.check_runs[] | select(.name | endswith("-env")) | { "config": .name, "build_path": .output.text }' <<< "$CHECK_RUNS")
3941
echo "filtered..."
40-
jq -e . <<< "$FILTERED"
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+
./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")
4244
echo "groups..."
43-
if jq -e . <<< "$GROUPS" > /dev/null 2>&1; then # JSON validation
45+
if ./jq -e . <<< "$GROUPS" > /dev/null 2>&1; then # JSON validation
4446
echo "Valid JSON"
4547
else
4648
echo "Invalid JSON: $GROUPS"

0 commit comments

Comments
 (0)