1
0
Fork 0
mirror of https://code.forgejo.org/forgejo/runner.git synced 2025-09-30 19:22:09 +00:00

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 fbab49c68d
commit 33f8290eb3
21 changed files with 951 additions and 468 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)