GitHub Actions "Can't find 'action.yml' ... under X" in CI
A local uses: ./path must point to a directory containing action.yml, action.yaml, or a Dockerfile. If the path is wrong, or the repo was not checked out, the runner cannot find the action manifest.
What this error means
The step fails with "Can't find 'action.yml', 'action.yaml' or 'Dockerfile' under '<path>'. Did you forget to run actions/checkout before running your local action?"
GitHub Actions
Error: Can't find 'action.yml', 'action.yaml' or 'Dockerfile' under
'/home/runner/work/repo/repo/.github/actions/build'.
Did you forget to run actions/checkout before running your local action?Common causes
The repository was not checked out
A local action path only exists after actions/checkout; without it the directory is empty.
The path or manifest filename is wrong
The uses: path points to a directory that does not contain action.yml/action.yaml/Dockerfile.
How to fix it
Check out the repo before the local action
- Add
actions/checkoutas the first step. - Confirm the action directory and
action.ymlexist at that path. - Re-run.
.github/workflows/ci.yml
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/buildCorrect the action path
Point uses: at the directory that contains the manifest, not at the manifest file itself.
How to prevent it
- Run
actions/checkoutbefore any localuses:. - Keep a valid
action.ymlin each action directory. - Use repo-relative paths starting with
./.
Related guides
GitHub Actions composite action "Input required and not supplied" in CIFix GitHub Actions composite action "Input required and not supplied: X" in CI - the action declares a requir…
GitHub Actions "Unable to resolve action ... unable to find version" in CIFix GitHub Actions "Unable to resolve action X, unable to find version Y" in CI - a `uses:` references a tag,…
GitHub Actions composite action "Required property is missing: shell" in CIFix GitHub Actions composite action "Required property is missing: shell" in CI - a `run` step inside a compo…