mirror of
https://github.com/pnpm/action-setup.git
synced 2025-04-20 19:06:44 +08:00
24 lines
593 B
TypeScript
24 lines
593 B
TypeScript
import { 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 runInstall: RunInstall[]
|
|
}
|
|
|
|
const options: InputOptions = {
|
|
required: true,
|
|
}
|
|
|
|
const parseInputPath = (name: string) => expandTilde(getInput(name, options))
|
|
|
|
export const getInputs = (): Inputs => ({
|
|
version: getInput('version', options),
|
|
dest: parseInputPath('dest'),
|
|
runInstall: parseRunInstall('run_install'),
|
|
})
|
|
|
|
export default getInputs
|