mirror of
https://code.forgejo.org/pnpm/action-setup.git
synced 2025-05-18 12:34:46 +00:00
23 lines
593 B
TypeScript
23 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
|