nektos/act · error

Expected format {org}/{repo}[/path]@ref. Actual '%s' Input s

Error message

Expected format {org}/{repo}[/path]@ref. Actual '%s' Input string was not in a correct format

What it means

The `uses:` string of a remote-action step does not match {org}/{repo}[/path]@ref. newRemoteAction applies the regex '^([^/@]+)/([^/@]+)(/([^@]*))?(@(.*))?$' and returns nil when there is no match or the ref after '@' is empty — prepareActionExecutor then throws this error.

Source

Thrown at pkg/runner/step_action_remote.go:49

	remoteAction        *remoteAction
	cacheDir            string
	resolvedSha         string
}

var (
	stepActionRemoteNewCloneExecutor = git.NewGitCloneExecutor
)

func (sar *stepActionRemote) prepareActionExecutor() common.Executor {
	return func(ctx context.Context) error {
		if sar.remoteAction != nil && sar.action != nil {
			// we are already good to run
			return nil
		}

		sar.remoteAction = newRemoteAction(sar.Step.Uses)
		if sar.remoteAction == nil {
			return fmt.Errorf("Expected format {org}/{repo}[/path]@ref. Actual '%s' Input string was not in a correct format", sar.Step.Uses)
		}

		github := sar.getGithubContext(ctx)
		sar.remoteAction.URL = github.ServerURL

		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
		}

		for _, action := range sar.RunContext.Config.ReplaceGheActionWithGithubCom {
			if strings.EqualFold(fmt.Sprintf("%s/%s", sar.remoteAction.Org, sar.remoteAction.Repo), action) {
				sar.remoteAction.URL = "https://github.com"
				github.Token = sar.RunContext.Config.ReplaceGheActionTokenWithGithubCom
			}
		}
		if sar.RunContext.Config.ActionCache != nil {
			cache := sar.RunContext.Config.ActionCache

View on GitHub (pinned to 4f41128141)

Solutions

  1. Add the required ref: 'actions/checkout@v4' or a full commit SHA.
  2. Ensure the format is org/repo[/subpath]@ref with exactly one '@' and a non-empty ref.
  3. Quote the uses value in YAML to avoid parser surprises.
  4. For local actions keep the './' prefix; for containers use the 'docker://' prefix.

Example fix

# before
- uses: actions/checkout
# after
- uses: actions/checkout@v4
Defensive patterns

Strategy: validation

Validate before calling

package main
import (
  "fmt"
  "regexp"
)
var usesRe = regexp.MustCompile(`^([^/@]+)/([^/@]+)(/([^@]*))?@(.+)$`)
func validUses(s string) bool { return usesRe.MatchString(s) }

Type guard

func validUses(s string) bool {
  ok, _ := regexp.MatchString(`^([^/@]+)/([^/@]+)(/([^@]*))?@(.+)$`, s)
  return ok
}

Prevention

When it happens

Trigger: `uses:` missing the @ref entirely ('actions/checkout'), containing more than two slash-separated leading segments with @ in wrong place, a ref of only '@', empty string, or '@' with nothing after it; also 'docker://' style uses routed to the remote step incorrectly.

Common situations: Forgetting '@v4' on an action reference; typos like 'actions/checkout@' or 'actions@@v4'; using './local' without the './' prefix so it is treated as remote; YAML stripping a value; unquoted `uses:` where an @ or special char confuses the parser.

Related errors


AI-assisted analysis of nektos/act@4f41128141 (2026-08-15). Data as JSON: /api/errors/1370fc3db0ee1564. Report an issue: GitHub.