mirror of
https://github.com/graycoreio/github-actions-magento2.git
synced 2026-06-13 13:14:53 +00:00
feat: add project versions (#110)
* refactor: allow version matrixes by projects * feat: add initial version-matrix for mage-os * feat: add project as optional input to action * docs: document new input * refactor: tighten types a bit * chore: apply change requests from code review
This commit is contained in:
@@ -1,16 +1,20 @@
|
||||
import * as core from '@actions/core';
|
||||
import { validateKind } from './kind/validate-kinds';
|
||||
import { getMatrixForKind } from './matrix/get-matrix-for-kind';
|
||||
import { validateProject } from "./project/validate-projects";
|
||||
|
||||
|
||||
export async function run(): Promise<void> {
|
||||
try {
|
||||
const kind = core.getInput("kind");
|
||||
const customVersions = core.getInput("custom_versions");
|
||||
const project = core.getInput("project");
|
||||
|
||||
validateProject(<any>project)
|
||||
|
||||
validateKind(<any>kind, customVersions ? customVersions.split(',') : undefined);
|
||||
|
||||
core.setOutput('matrix', getMatrixForKind(kind, customVersions));
|
||||
core.setOutput('matrix', getMatrixForKind(kind, project, customVersions));
|
||||
}
|
||||
catch (error) {
|
||||
core.setFailed(error.message);
|
||||
|
||||
Reference in New Issue
Block a user