Files
k8s-deploy/src/inputUtils.ts
T
github-actions[bot] bba74ad3b5 v4 new release (#232)
2022-08-16 14:53:55 -04:00

17 lines
495 B
TypeScript

import * as core from '@actions/core'
import {parseAnnotations} from './types/annotations'
export const inputAnnotations = parseAnnotations(
core.getInput('annotations', {required: false})
)
export function getBufferTime(): number {
const inputBufferTime = parseInt(
core.getInput('version-switch-buffer') || '0'
)
if (inputBufferTime < 0 || inputBufferTime > 300)
throw Error('Version switch buffer must be between 0 and 300 (inclusive)')
return inputBufferTime
}