mirror of
https://code.forgejo.org/forgejo/runner.git
synced 2025-08-06 17:40:58 +00:00
fix: localcheckout mock (#1198)
* Update run_context.go * Update step_action_remote.go * Update step_action_remote.go * [no ci] eval path * Update step_action_remote.go * Update step_action_remote.go * Update step_action_remote.go Co-authored-by: Casey Lee <cplee@nektos.com>
This commit is contained in:
parent
1d45a5f2c7
commit
f083ea85c9
2 changed files with 7 additions and 24 deletions
|
@ -110,8 +110,13 @@ func (sar *stepActionRemote) main() common.Executor {
|
|||
runStepExecutor(sar, stepStageMain, func(ctx context.Context) error {
|
||||
github := sar.RunContext.getGithubContext(ctx)
|
||||
if sar.remoteAction.IsCheckout() && isLocalCheckout(github, sar.Step) && !sar.RunContext.Config.NoSkipCheckout {
|
||||
common.Logger(ctx).Debugf("Skipping local actions/checkout because workdir was already copied")
|
||||
return nil
|
||||
if sar.RunContext.Config.BindWorkdir {
|
||||
common.Logger(ctx).Debugf("Skipping local actions/checkout because you bound your workspace")
|
||||
return nil
|
||||
}
|
||||
eval := sar.RunContext.NewExpressionEvaluator(ctx)
|
||||
copyToPath := filepath.Join(sar.RunContext.Config.ContainerWorkdir(), eval.Interpolate(ctx, sar.Step.With["path"]))
|
||||
return sar.RunContext.JobContainer.CopyDir(copyToPath, sar.RunContext.Config.Workdir+string(filepath.Separator)+".", sar.RunContext.Config.UseGitIgnore)(ctx)
|
||||
}
|
||||
|
||||
actionDir := fmt.Sprintf("%s/%s", sar.RunContext.ActionCacheDir(), strings.ReplaceAll(sar.Step.Uses, "/", "-"))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue