feat(supported-version): validate custom_versions

Previously, @danslo reported that he tried to use `custom_versions` without
setting the kind. This isn't the correct behavior.
I've added a validator to alert him of this.
This commit is contained in:
Damien Retzinger
2023-04-16 15:13:48 -04:00
parent 81a1eb2273
commit 5c198049f7
10 changed files with 69 additions and 42 deletions
+3 -3
View File
@@ -1,15 +1,15 @@
import * as core from '@actions/core';
import { validateOrError } from './kind/compute-kind';
import { validateKind } from './kind/validate-kinds';
import { getMatrixForKind } from './matrix/get-matrix-for-kind';
export async function run(): Promise<void> {
try {
const kind = core.getInput("kind");
validateOrError(kind);
const customVersions = core.getInput("custom_versions");
validateKind(<any>kind, customVersions.split(','));
core.setOutput('matrix', getMatrixForKind(kind, customVersions));
}
catch (error) {