Extract github actions utils

This commit is contained in:
Paul Merlin
2020-06-14 19:05:03 +02:00
parent 059f2e7791
commit fcc1683d01
2 changed files with 15 additions and 13 deletions

9
src/github-utils.ts Normal file
View File

@@ -0,0 +1,9 @@
import * as core from '@actions/core'
export function inputOrNull(name: string): string | null {
const inputString = core.getInput(name, {required: false})
if (inputString.length === 0) {
return null
}
return inputString
}