Skip to content
Latchkey

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

  1. Add actions/checkout as the first step.
  2. Confirm the action directory and action.yml exist at that path.
  3. Re-run.
.github/workflows/ci.yml
steps:
  - uses: actions/checkout@v4
  - uses: ./.github/actions/build

Correct the action path

Point uses: at the directory that contains the manifest, not at the manifest file itself.

How to prevent it

  • Run actions/checkout before any local uses:.
  • Keep a valid action.yml in each action directory.
  • Use repo-relative paths starting with ./.

Related guides

Tired of flaky CI? Latchkey auto-heals failed jobs and retries them for you. Start free →