-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.js
More file actions
30 lines (28 loc) · 770 Bytes
/
index.js
File metadata and controls
30 lines (28 loc) · 770 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
26
27
28
29
30
const core = require('@actions/core');
const avrolint = require('./avrolint');
async function run() {
try {
// 'avsc-to-lint' input defined in action metadata file
const avscToLint = core.getInput('avsc-to-lint', {required: true});
const undocumentedCheck = core.getBooleanInput(
'undocumented-field-check',
{required: true}
);
const complexUnionCheck = core.getBooleanInput(
'complex-union-check',
{required: true}
);
console.log(`Linting ${avscToLint}!`);
await avrolint(
avscToLint,
{
"undocumentedCheck": undocumentedCheck,
"complexUnionCheck": complexUnionCheck
}
);
} catch (error) {
console.error(error.stack);
core.setFailed(error.message);
}
}
run();