This commit is contained in:
Ashwin Bharambe 2025-07-31 16:43:35 -07:00
parent ed81fb260b
commit f4a9b976a0

View file

@ -57,9 +57,16 @@ jobs:
if [[ $labels == *"re-record-tests"* ]]; then
modes_array+=("non-vision")
fi
matrix_modes=$(jq -n -c '$ARGS.positional' --jsonargs -- "${modes_array[@]}")
# Convert to JSON array
if [ ${#modes_array[@]} -eq 0 ]; then
matrix_modes="[]"
else
matrix_modes=$(printf '%s\n' "${modes_array[@]}" | jq -R -s -c 'split("\n")[:-1]')
fi
echo "matrix_modes=$matrix_modes"
echo "matrix-modes=$matrix_modes" >> $GITHUB_OUTPUT
env:
GH_TOKEN: ${{ github.token }}