added setupoptions for github
This commit is contained in:
@@ -8,7 +8,7 @@ import * as toolCache from "@actions/tool-cache";
|
||||
|
||||
import { injectable } from "inversify";
|
||||
|
||||
import { IBuildAgent, IExecResult } from "../interfaces";
|
||||
import { IBuildAgent, IExecResult } from "../interface";
|
||||
|
||||
@injectable()
|
||||
class BuildAgent implements IBuildAgent {
|
||||
@@ -61,6 +61,10 @@ class BuildAgent implements IBuildAgent {
|
||||
core.exportVariable(name, val);
|
||||
}
|
||||
|
||||
public getVariable(name: string): string {
|
||||
return process.env[name];
|
||||
}
|
||||
|
||||
public addPath(inputPath: string): void {
|
||||
core.addPath(inputPath);
|
||||
}
|
||||
@@ -94,6 +98,15 @@ class BuildAgent implements IBuildAgent {
|
||||
stdout,
|
||||
};
|
||||
}
|
||||
|
||||
public getInput(input: string, required?: boolean): string {
|
||||
return core.getInput(input, { required } as core.InputOptions);
|
||||
}
|
||||
|
||||
public getBooleanInput(input: string, required?: boolean): boolean {
|
||||
const inputValue = this.getInput(input, required);
|
||||
return (inputValue || "false").toLowerCase() === "true";
|
||||
}
|
||||
}
|
||||
|
||||
export {
|
||||
|
||||
Reference in New Issue
Block a user