mirror of
https://github.com/grafana/grafana.git
synced 2024-11-27 19:30:36 -06:00
8ed5b95f42
* chore: only run the breaking-changes flow on pull requests * chore: run the detect-breaking-changes flow on opening a PR * chore: use * Wip * Wip * Wip * Wip * Wip * Wip * Wip * Wip * Wip * Wip * Wip * Wip * Wip * Wip * Wip * Wip * Wip * trying to get workflow split running. * trying to trigger workflow. * trying to trigger. * Splits levitate job into two workflows. Co-authored-by: Marcus Andersson <marcus.andersson@grafana.com>
27 lines
738 B
JavaScript
27 lines
738 B
JavaScript
module.exports = async ({ core, filePath }) => {
|
|
try {
|
|
const fs = require('fs');
|
|
const content = await readFile(fs, 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.restFailed(error.message);
|
|
}
|
|
}
|
|
|
|
async function readFile(fs, path) {
|
|
return new Promise((resolve, reject) => {
|
|
fs.readFile(path, (error, data) => {
|
|
if (error) return reject(error);
|
|
return resolve(data);
|
|
});
|
|
});
|
|
} |