diff --git a/.github/workflows/record-integration-tests.yml b/.github/workflows/record-integration-tests.yml index 8d44b0779..ef2aefd05 100644 --- a/.github/workflows/record-integration-tests.yml +++ b/.github/workflows/record-integration-tests.yml @@ -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 }}