Fix js-yaml usage
This commit is contained in:
parent
2a105263a5
commit
3a2c7247e1
BIN
dist/index.js
vendored
BIN
dist/index.js
vendored
Binary file not shown.
@ -1,5 +1,5 @@
|
|||||||
import process from 'process'
|
import process from 'process'
|
||||||
import { safeLoad } from 'js-yaml'
|
import { load } from 'js-yaml'
|
||||||
import Ajv from 'ajv'
|
import Ajv from 'ajv'
|
||||||
import { getInput, error, InputOptions } from '@actions/core'
|
import { getInput, error, InputOptions } from '@actions/core'
|
||||||
import runInstallSchema from './run-install-input.schema.json'
|
import runInstallSchema from './run-install-input.schema.json'
|
||||||
@ -21,10 +21,9 @@ const options: InputOptions = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export function parseRunInstall(name: string): RunInstall[] {
|
export function parseRunInstall(name: string): RunInstall[] {
|
||||||
const result: RunInstallInput = safeLoad(getInput(name, options)) as any
|
const result: RunInstallInput = load(getInput(name, options)) as any
|
||||||
const ajv = new Ajv({
|
const ajv = new Ajv({
|
||||||
allErrors: true,
|
allErrors: true,
|
||||||
async: false,
|
|
||||||
})
|
})
|
||||||
const validate = ajv.compile(runInstallSchema)
|
const validate = ajv.compile(runInstallSchema)
|
||||||
if (!validate(result)) {
|
if (!validate(result)) {
|
||||||
|
Loading…
Reference in New Issue
Block a user