@@ -467,24 +467,30 @@ func (sc *StepContext) runAction(actionDir string, actionPath string, localActio
467
467
468
468
sc .Env = mergeMaps (sc .Env , action .Runs .Env )
469
469
470
- log .Debugf ("type=%v actionDir=%s actionPath=%s Workdir =%s ActionCacheDir =%s actionName=%s containerActionDir=%s" , step .Type (), actionDir , actionPath , rc .Config .Workdir , rc .ActionCacheDir (), actionName , containerActionDir )
470
+ log .Debugf ("type=%v actionDir=%s actionPath=%s workdir =%s actionCacheDir =%s actionName=%s containerActionDir=%s" , step .Type (), actionDir , actionPath , rc .Config .Workdir , rc .ActionCacheDir (), actionName , containerActionDir )
471
471
472
472
maybeCopyToActionDir := func () error {
473
473
sc .Env ["GITHUB_ACTION_PATH" ] = containerActionDir
474
474
if step .Type () != model .StepTypeUsesActionRemote {
475
475
return nil
476
476
}
477
- err := removeGitIgnore (actionDir )
478
- if err != nil {
477
+ if err := removeGitIgnore (actionDir ); err != nil {
479
478
return err
480
479
}
481
- return rc .JobContainer .CopyDir (containerActionDir + "/" , actionLocation + "/" , rc .Config .UseGitIgnore )(ctx )
480
+
481
+ var containerActionDirCopy string
482
+ containerActionDirCopy = strings .TrimSuffix (containerActionDir , actionPath )
483
+ log .Debug (containerActionDirCopy )
484
+
485
+ if ! strings .HasSuffix (containerActionDirCopy , `/` ) {
486
+ containerActionDirCopy += `/`
487
+ }
488
+ return rc .JobContainer .CopyDir (containerActionDirCopy , actionDir + "/" , rc .Config .UseGitIgnore )(ctx )
482
489
}
483
490
484
491
switch action .Runs .Using {
485
492
case model .ActionRunsUsingNode12 :
486
- err := maybeCopyToActionDir ()
487
- if err != nil {
493
+ if err := maybeCopyToActionDir (); err != nil {
488
494
return err
489
495
}
490
496
containerArgs := []string {"node" , path .Join (containerActionDir , action .Runs .Main )}
0 commit comments