forked from mage-os/github-actions
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.ts
More file actions
25 lines (19 loc) · 778 Bytes
/
index.ts
File metadata and controls
25 lines (19 loc) · 778 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
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");
const recent_time_frame = core.getInput("recent_time_frame");
validateProject(<any>project)
validateKind(<any>kind, customVersions ? customVersions.split(',') : undefined);
core.setOutput('matrix', getMatrixForKind(kind, project, customVersions, recent_time_frame));
}
catch (error) {
core.setFailed(error.message);
}
}
run()