docker(install): allow specifying custom lima images

Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
This commit is contained in:
CrazyMax
2023-12-10 16:03:53 +01:00
parent 348446a8d6
commit 4995997eed
5 changed files with 73 additions and 7 deletions

View File

@@ -19,22 +19,24 @@ import * as core from '@actions/core';
import * as io from '@actions/io';
import {parse} from 'csv-parse/sync';
export interface InputListOpts {
export interface ListOpts {
ignoreComma?: boolean;
comment?: string;
quote?: string | boolean | Buffer | null;
}
export class Util {
public static getInputList(name: string, opts?: InputListOpts): string[] {
const res: Array<string> = [];
public static getInputList(name: string, opts?: ListOpts): string[] {
return this.getList(core.getInput(name), opts);
}
const items = core.getInput(name);
if (items == '') {
public static getList(input: string, opts?: ListOpts): string[] {
const res: Array<string> = [];
if (input == '') {
return res;
}
const records = parse(items, {
const records = parse(input, {
columns: false,
relaxQuotes: true,
comment: opts?.comment,