{"record":{"id":"a3000737eb339c3a","repo":"nektos/act","slug":"failed-to-read-s-from-action-s-with-path-s","errorCode":null,"errorMessage":"failed to read '%s' from action '%s' with path '%s' of step: %w","messagePattern":"failed to read '(.+?)' from action '(.+?)' with path '(.+?)' of step: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/runner/action.go","lineNumber":48,"sourceCode":"}\n\ntype readAction func(ctx context.Context, step *model.Step, actionDir string, actionPath string, readFile actionYamlReader, writeFile fileWriter) (*model.Action, error)\n\ntype actionYamlReader func(filename string) (io.Reader, io.Closer, error)\n\ntype fileWriter func(filename string, data []byte, perm fs.FileMode) error\n\ntype runAction func(step actionStep, actionDir string, remoteAction *remoteAction) common.Executor\n\n//go:embed res/trampoline.js\nvar trampoline embed.FS\n\nfunc readActionImpl(ctx context.Context, step *model.Step, actionDir string, actionPath string, readFile actionYamlReader, writeFile fileWriter) (*model.Action, error) {\n\tlogger := common.Logger(ctx)\n\tallErrors := []error{}\n\taddError := func(fileName string, err error) {\n\t\tif err != nil {\n\t\t\tallErrors = append(allErrors, fmt.Errorf(\"failed to read '%s' from action '%s' with path '%s' of step: %w\", fileName, step.String(), actionPath, err))\n\t\t} else {\n\t\t\t// One successful read, clear error state\n\t\t\tallErrors = nil\n\t\t}\n\t}\n\treader, closer, err := readFile(\"action.yml\")\n\taddError(\"action.yml\", err)\n\tif os.IsNotExist(err) {\n\t\treader, closer, err = readFile(\"action.yaml\")\n\t\taddError(\"action.yaml\", err)\n\t\tif os.IsNotExist(err) {\n\t\t\t_, closer, err := readFile(\"Dockerfile\")\n\t\t\taddError(\"Dockerfile\", err)\n\t\t\tif err == nil {\n\t\t\t\tcloser.Close()\n\t\t\t\taction := &model.Action{\n\t\t\t\t\tName: \"(Synthetic)\",\n\t\t\t\t\tRuns: model.ActionRuns{","sourceCodeStart":30,"sourceCodeEnd":66,"githubUrl":"https://github.com/nektos/act/blob/4f411281417e88660bea1c1a1749aa71ae0bd60f/pkg/runner/action.go#L30-L66","documentation":"readActionImpl tries action.yml, then action.yaml, then Dockerfile when loading an action's metadata; each failed read is appended via addError. If no read succeeds, the accumulated errors are returned with this wrapper naming the step and actionPath. A single successful read clears the accumulated state, so this error means none of the metadata files could be read.","triggerScenarios":"A remote action repository has no action.yml/action.yaml/Dockerfile at its root; a composite action's nested actionPath points at a subdirectory lacking metadata; the cloned action cache is incomplete after an interrupted fetch.","commonSituations":"Using an action whose repo renamed/moved metadata files; wrong `uses:` path for monorepo actions needing a subpath (e.g. missing `/subdir`); corrupted ~/.cache/act action downloads; private action fetched with bad credentials yielding empty dirs.","solutions":["Verify the action repository actually contains action.yml or action.yaml at the referenced path (add the subdirectory in `uses:` for monorepos).","Clear the action cache (`rm -rf ~/.cache/act` or the configured cache dir) and re-run so the action re-clones.","Check credentials/permissions for private actions — a failed clone leaves an empty dir that produces this error.","Pin a known-good tag/SHA of the action in `uses:`."],"exampleFix":"# before\n- uses: myorg/monorepo@v1\n# after (metadata lives in subdir)\n- uses: myorg/monorepo/subdir/action@v1","handlingStrategy":"validation","validationCode":"func actionMetadataExists(dir string) bool {\n    for _, f := range []string{\"action.yml\", \"action.yaml\", \"Dockerfile\"} {\n        if _, err := os.Stat(filepath.Join(dir, f)); err == nil { return true }\n    }\n    return false\n}","typeGuard":null,"tryCatchPattern":"if err != nil && strings.Contains(err.Error(), \"failed to read 'action.yml'\") {\n    // check the action repo for metadata at the referenced path; clear the act cache and retry\n}","preventionTips":["Pin actions to tags/SHAs you have verified contain action.yml or action.yaml.","For monorepo actions include the subdirectory in `uses:`.","Wipe ~/.cache/act after network failures or credential changes to avoid half-cloned actions."],"tags":["action","metadata","cache","uses"],"backgroundTag":null,"analyzedSha":"4f411281417e88660bea1c1a1749aa71ae0bd60f","analyzedAt":"2026-08-15T09:19:46.307Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}