Cloud Runner v2 (#310)

This commit is contained in:
Frostebite
2022-02-01 02:31:20 +00:00
committed by GitHub
parent 4e38a84fe7
commit 03ae77dc7c
90 changed files with 162797 additions and 97684 deletions

View File

@@ -0,0 +1,17 @@
import fs from 'fs';
import path from 'path';
import YAML from 'yaml';
export class ActionYamlReader {
private actionYamlParsed: any;
public constructor() {
let filename = `action.yml`;
if (!fs.existsSync(filename)) {
filename = path.join(__dirname, `..`, filename);
}
this.actionYamlParsed = YAML.parse(fs.readFileSync(filename).toString());
}
public GetActionYamlValue(key: string) {
return this.actionYamlParsed.inputs[key]?.description || 'No description found in action.yml';
}
}