Handle relative workflow paths

This commit is contained in:
Simon Engledew 2020-11-24 09:56:10 +00:00
parent 33bb87523e
commit c0bd7b0b2b
No known key found for this signature in database
GPG key ID: 84302E7B02FE8BCE
3 changed files with 11 additions and 3 deletions

View file

@ -218,7 +218,13 @@ export function validateWorkflow(doc: Workflow): string[] {
}
export async function getWorkflow(): Promise<Workflow> {
return yaml.safeLoad(fs.readFileSync(await getWorkflowPath(), "utf-8"));
const relativePath = await getWorkflowPath();
const absolutePath = path.join(
getRequiredEnvParam("GITHUB_WORKSPACE"),
relativePath
);
return yaml.safeLoad(fs.readFileSync(absolutePath, "utf-8"));
}
/**