fix: prefer getMultilineInput and getBooleanInput from actions/core
This commit is contained in:
parent
a7bb76508d
commit
9758f4618e
3 changed files with 8 additions and 31 deletions
14
src/utils.ts
14
src/utils.ts
|
@ -2,20 +2,6 @@ import * as core from '@actions/core'
|
|||
import * as fs from 'fs'
|
||||
import * as path from 'path'
|
||||
|
||||
export function getInputAsArray(
|
||||
name: string,
|
||||
options?: core.InputOptions
|
||||
): string[] {
|
||||
return getStringAsArray(core.getInput(name, options))
|
||||
}
|
||||
|
||||
export function getStringAsArray(str: string): string[] {
|
||||
return str
|
||||
.split(/[\n,]+/)
|
||||
.map(s => s.trim())
|
||||
.filter(x => x !== '')
|
||||
}
|
||||
|
||||
export function getRepoPath(relativePath?: string): string {
|
||||
let githubWorkspacePath = process.env['GITHUB_WORKSPACE']
|
||||
if (!githubWorkspacePath) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue