mirror of
https://github.com/grafana/grafana.git
synced 2024-11-27 11:20:27 -06:00
18 lines
515 B
JavaScript
18 lines
515 B
JavaScript
module.exports = async ({ core, filePath }) => {
|
|
try {
|
|
const fs = require('fs').promises;
|
|
const content = await fs.readFile(filePath)
|
|
const result = JSON.parse(content);
|
|
|
|
core.startGroup('Parsing json file...');
|
|
|
|
for (const property in result) {
|
|
core.info(`${property} <- ${result[property]}`);
|
|
core.setOutput(property, result[property]);
|
|
}
|
|
|
|
core.endGroup();
|
|
} catch (error) {
|
|
core.setFailed(error.message);
|
|
}
|
|
} |