successfully able to run simple workflows

Signed-off-by: Casey Lee <cplee@nektos.com>
This commit is contained in:
Casey Lee
2020-02-06 22:17:58 -08:00
parent 8c49ba0cec
commit 532af98aef
23 changed files with 958 additions and 495 deletions

View File

@@ -7,7 +7,7 @@ import (
// Input contains the input for the root command
type Input struct {
workingDir string
workdir string
workflowsPath string
eventPath string
reuseContainers bool
@@ -16,7 +16,7 @@ type Input struct {
}
func (i *Input) resolve(path string) string {
basedir, err := filepath.Abs(i.workingDir)
basedir, err := filepath.Abs(i.workdir)
if err != nil {
log.Fatal(err)
}
@@ -29,6 +29,11 @@ func (i *Input) resolve(path string) string {
return path
}
// Workdir returns path to workdir
func (i *Input) Workdir() string {
return i.resolve(".")
}
// WorkflowsPath returns path to workflows
func (i *Input) WorkflowsPath() string {
return i.resolve(i.workflowsPath)