chore(deps): bump @actions/core from 1.2.7 to 1.3.0 (#203)

* chore(deps): bump @actions/core from 1.2.7 to 1.3.0

Bumps [@actions/core](https://github.com/actions/toolkit/tree/HEAD/packages/core) from 1.2.7 to 1.3.0.
- [Release notes](https://github.com/actions/toolkit/releases)
- [Changelog](https://github.com/actions/toolkit/blob/main/packages/core/RELEASES.md)
- [Commits](https://github.com/actions/toolkit/commits/HEAD/packages/core)

Signed-off-by: dependabot[bot] <support@github.com>

* feat: switch to YAML boolean for inputs

The parsing is now handled by `@actions/core` package

* docs(README): minor changes

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Federico Grandi <fgrandi30@gmail.com>
This commit is contained in:
dependabot[bot]
2021-05-24 16:45:13 +02:00
committed by GitHub
parent bf5e32ae7d
commit b2ad943ed9
7 changed files with 40 additions and 35 deletions

View File

@@ -35,7 +35,10 @@ export const outputs: Record<Output, 'true' | 'false'> = {
tagged: 'false'
}
export function getInput(name: Input) {
export function getInput(name: Input, bool: true): boolean
export function getInput(name: Input, bool?: false): string
export function getInput(name: Input, bool = false) {
if (bool) return core.getBooleanInput(name)
return tools.inputs[name] || ''
}
@@ -92,13 +95,6 @@ export function matchGitArgs(string: string) {
return parsed
}
export function parseBool(value: any) {
try {
const parsed = JSON.parse(value)
if (typeof parsed == 'boolean') return parsed
} catch {}
}
export function readJSON(filePath: string) {
let fileContent: string
try {