diff --git a/pkg/runner/action.go b/pkg/runner/action.go index 7048f4d..b8017df 100644 --- a/pkg/runner/action.go +++ b/pkg/runner/action.go @@ -42,6 +42,9 @@ var trampoline embed.FS func readActionImpl(ctx context.Context, step *model.Step, actionDir string, actionPath string, readFile actionYamlReader, writeFile fileWriter) (*model.Action, error) { logger := common.Logger(ctx) reader, closer, err := readFile("action.yml") + if err != nil { + logger.Debugf("readActionImpl actionDir %s actionPath %s failed %v", actionDir, actionPath, err) + } if os.IsNotExist(err) { reader, closer, err = readFile("action.yaml") if err != nil { @@ -439,11 +442,15 @@ func getContainerActionPaths(step *model.Step, actionDir string, rc *RunContext) actionName = strings.ReplaceAll(actionName, "\\", "/") } } + common.Logger(context.Background()).Debugf("getContainerActionPaths step.Type %s, rc.Config.Workdir %s, actionName %s, containerActionDir %s", step.Type().String(), rc.Config.Workdir, actionName, containerActionDir) return actionName, containerActionDir } func getOsSafeRelativePath(s, prefix string) string { actionName := strings.TrimPrefix(s, prefix) + if s == actionName { + common.Logger(context.Background()).Errorf("getOsSafeRelativePath %s does not beging with %s", s, prefix) + } if runtime.GOOS == "windows" { actionName = strings.ReplaceAll(actionName, "\\", "/") } diff --git a/pkg/runner/step_action_local.go b/pkg/runner/step_action_local.go index 6b4fc06..fdef2a1 100644 --- a/pkg/runner/step_action_local.go +++ b/pkg/runner/step_action_local.go @@ -44,10 +44,12 @@ func (sal *stepActionLocal) main() common.Executor { return func(filename string) (io.Reader, io.Closer, error) { tars, err := sal.RunContext.JobContainer.GetContainerArchive(ctx, path.Join(cpath, filename)) if err != nil { + common.Logger(context.Background()).Debugf("stepActionLocal reader %s failed %v", path.Join(cpath, filename), err) return nil, nil, os.ErrNotExist } treader := tar.NewReader(tars) if _, err := treader.Next(); err != nil { + common.Logger(context.Background()).Debugf("stepActionLocal reader %s failed %v", path.Join(cpath, filename), err) return nil, nil, os.ErrNotExist } return treader, tars, nil