nektos/act · error

%s (%s): %w

Error message

%s (%s): %w

What it means

Inside the tar-streaming walker (writeZipArchive/applyPrefixes area of pkg/runner/action_cache.go), when an include-prefix entry names a path that is neither a subtree nor a file, it calls t.File(destPath) and wraps the resulting error as "destPath (origin): err". This is effectively 'path not found in the action repo tree': the composite/docker action's metadata (e.g. an action repo subpath or entrypoint path) references a file that does not exist at the fetched sha.

Source

Thrown at pkg/runner/action_cache.go:206

	}
	if fmode&fs.ModeSymlink == fs.ModeSymlink {
		content, err := f.Contents()
		if err != nil {
			return err
		}

		destPath := path.Join(path.Dir(f.Name), content)

		subtree, err := t.Tree(destPath)
		if err == nil {
			return subtree.Files().ForEach(func(ft *object.File) error {
				return actionCacheCopyFileOrDir(ctx, cleanIncludePrefix, t, tw, origin+strings.TrimPrefix(ft.Name, f.Name), f)
			})
		}

		f, err := t.File(destPath)
		if err != nil {
			return fmt.Errorf("%s (%s): %w", destPath, origin, err)
		}
		return actionCacheCopyFileOrDir(ctx, cleanIncludePrefix, t, tw, origin, f)
	}
	header, err := tar.FileInfoHeader(&GitFileInfo{
		name: name,
		mode: fmode,
		size: f.Size,
	}, "")
	if err != nil {
		return err
	}
	err = tw.WriteHeader(header)
	if err != nil {
		return err
	}
	reader, err := f.Reader()
	if err != nil {
		return err

View on GitHub (pinned to 4f41128141)

Solutions

  1. Inspect the destPath in the error and confirm the file exists in the repo at the pinned ref (browse github.com/{owner}/{repo}/tree/{ref}).
  2. Pin to a tag/commit where the path existed, or update the path in your workflow's 'uses:' / the action's entrypoint.
  3. If you maintain the action, ensure entrypoint/pre-entrypoint paths are relative to action.yml and committed.
  4. Clear cache after path changes upstream: rm -rf ~/.cache/act.

Example fix

# before (workflow)
uses: org/repo/.github/actions/deploy/subdir@v1  # 'subdir' lacks action files

# after
uses: org/repo/.github/actions/deploy@v1
Defensive patterns

Strategy: validation

Validate before calling

curl -fsS "https://raw.githubusercontent.com/{owner}/{repo}/{ref}/<destPath-from-error>" >/dev/null && echo 'path exists' || echo 'path missing at ref'

Prevention

When it happens

Trigger: includePrefix points into a directory that exists but the joined destPath misses a file: action.yml 'entrypoint:' or pre-entrypoint script path wrong, or the 'uses: owner/repo/subdir@ref' subdir layout changed at that ref so the requested file is absent.

Common situations: Upstream action reorganized files between tags (entrypoint moved from Dockerfile-adjacent script to another dir); typo'd subpath in 'uses:'; ref pointing to a commit before a file was added.

Related errors


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