Test Action / Test with default inputs (macos-latest, 9.15.5) (push) Canceled after 0s
Test Action / Test with default inputs (ubuntu-latest, 9.15.5) (push) Failing after 3s
Test Action / Test with default inputs (windows-latest, 9.15.5) (push) Canceled after 0s
Test Action / Test with dest (macos-latest, 9.15.5) (push) Canceled after 0s
Test Action / Test with dest (ubuntu-latest, 9.15.5) (push) Failing after 1s
Test Action / Test with dest (windows-latest, 9.15.5) (push) Canceled after 0s
Test Action / Test with standalone (ubuntu-latest, false) (push) Failing after 2s
Test Action / Test with standalone (ubuntu-latest, true) (push) Failing after 2s
Test Action / Test with standalone (windows-latest, false) (push) Canceled after 0s
Test Action / Test with standalone (windows-latest, true) (push) Canceled after 0s
Test Action / Test with run_install (array, macos-latest) (push) Canceled after 0s
Test Action / Test with run_install (array, ubuntu-latest) (push) Failing after 1s
Test Action / Test with run_install (array, windows-latest) (push) Canceled after 0s
Test Action / Test with run_install (empty object, macos-latest) (push) Canceled after 0s
Test Action / Test with run_install (empty object, ubuntu-latest) (push) Failing after 1s
Test Action / Test with run_install (empty object, windows-latest) (push) Canceled after 0s
Test Action / Test with run_install (global, macos-latest) (push) Canceled after 0s
Test Action / Test with run_install (global, ubuntu-latest) (push) Failing after 1s
Test Action / Test with run_install (global, windows-latest) (push) Canceled after 0s
Test Action / Test with run_install (null, macos-latest) (push) Canceled after 0s
Test Action / Test with run_install (null, ubuntu-latest) (push) Failing after 1s
Test Action / Test with run_install (null, windows-latest) (push) Canceled after 0s
Test Action / Test with run_install (recursive, macos-latest) (push) Canceled after 0s
Test Action / Test with run_install (recursive, ubuntu-latest) (push) Failing after 1s
Test Action / Test with run_install (recursive, windows-latest) (push) Canceled after 0s
32 lines
933 B
TypeScript
32 lines
933 B
TypeScript
import { getBooleanInput, getInput, InputOptions } from '@actions/core'
|
|
import expandTilde from 'expand-tilde'
|
|
import { RunInstall, parseRunInstall } from './run-install'
|
|
|
|
export interface Inputs {
|
|
readonly version?: string
|
|
readonly dest: string
|
|
readonly cache: boolean
|
|
readonly cacheDependencyPath: string
|
|
readonly runInstall: RunInstall[]
|
|
readonly packageJsonFile: string
|
|
readonly standalone: boolean
|
|
}
|
|
|
|
const options: InputOptions = {
|
|
required: true,
|
|
}
|
|
|
|
const parseInputPath = (name: string) => expandTilde(getInput(name, options))
|
|
|
|
export const getInputs = (): Inputs => ({
|
|
version: getInput('version'),
|
|
dest: parseInputPath('dest'),
|
|
cache: getBooleanInput('cache'),
|
|
cacheDependencyPath: parseInputPath('cache_dependency_path'),
|
|
runInstall: parseRunInstall('run_install'),
|
|
packageJsonFile: parseInputPath('package_json_file'),
|
|
standalone: getBooleanInput('standalone'),
|
|
})
|
|
|
|
export default getInputs
|