update to latest version of action parser
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
package actions
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"os"
|
||||
"path/filepath"
|
||||
@@ -60,12 +59,14 @@ func (runner *runnerImpl) setupWorkflows() error {
|
||||
defer workflowReader.Close()
|
||||
|
||||
runner.workflowConfig, err = parser.Parse(workflowReader)
|
||||
if err != nil {
|
||||
parserError := err.(*parser.ParserError)
|
||||
for _, e := range parserError.Errors {
|
||||
fmt.Fprintln(os.Stderr, e)
|
||||
/*
|
||||
if err != nil {
|
||||
parserError := err.(*parser.ParserError)
|
||||
for _, e := range parserError.Errors {
|
||||
fmt.Fprintln(os.Stderr, e)
|
||||
}
|
||||
}
|
||||
}
|
||||
*/
|
||||
return err
|
||||
}
|
||||
|
||||
|
@@ -95,10 +95,18 @@ func (runner *runnerImpl) newActionExecutor(actionName string) common.Executor {
|
||||
for k, v := range env {
|
||||
envList = append(envList, fmt.Sprintf("%s=%s", k, v))
|
||||
}
|
||||
|
||||
var cmd, entrypoint []string
|
||||
if action.Args != nil {
|
||||
cmd = action.Args.Split()
|
||||
}
|
||||
if action.Runs != nil {
|
||||
entrypoint = action.Runs.Split()
|
||||
}
|
||||
executors = append(executors, container.NewDockerRunExecutor(container.NewDockerRunExecutorInput{
|
||||
DockerExecutorInput: in,
|
||||
Cmd: action.Args.Parsed,
|
||||
Entrypoint: action.Runs.Parsed,
|
||||
Cmd: cmd,
|
||||
Entrypoint: entrypoint,
|
||||
Image: image,
|
||||
WorkingDir: "/github/workspace",
|
||||
Env: envList,
|
||||
|
Reference in New Issue
Block a user