diff --git a/src/Runner.Worker/ActionManager.cs b/src/Runner.Worker/ActionManager.cs index 04112b533be..b11b6994785 100644 --- a/src/Runner.Worker/ActionManager.cs +++ b/src/Runner.Worker/ActionManager.cs @@ -1127,8 +1127,16 @@ private ActionSetupInfo PrepareRepositoryActionAsync(IExecutionContext execution } else { - var fullPath = IOUtil.ResolvePath(actionEntryDirectory, "."); // resolve full path without access filesystem. - throw new InvalidOperationException($"Can't find 'action.yml', 'action.yaml' or 'Dockerfile' under '{fullPath}'. Did you forget to run actions/checkout before running your local action?"); + var reference = repositoryReference.Name; + if (!string.IsNullOrEmpty(repositoryReference.Path)) + { + reference = $"{reference}/{repositoryReference.Path}"; + } + if (!string.IsNullOrEmpty(repositoryReference.Ref)) + { + reference = $"{reference}@{repositoryReference.Ref}"; + } + throw new InvalidOperationException($"Can't find 'action.yml', 'action.yaml' or 'Dockerfile' for action '{reference}'."); } }