mirror of
https://github.com/graycoreio/github-actions-magento2.git
synced 2026-06-13 13:14:53 +00:00
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:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user