mirror of
https://github.com/gradle/actions.git
synced 2025-11-26 17:09:10 +08:00
Extract github actions utils
This commit is contained in:
9
src/github-utils.ts
Normal file
9
src/github-utils.ts
Normal 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
|
||||
}
|
||||
Reference in New Issue
Block a user