Skip to content
Latchkey

GitHub Actions Composite Action Nested uses: Fails to Resolve

A composite action that calls another action with uses: fails because the nested reference cannot be located. Local (./...) paths inside a composite resolve relative to the action repo, not the caller workspace.

What this error means

A composite action step errors with "Can't find 'action.yml'" or "the action could not be found", pointing at a nested uses: path that does not resolve from where the composite runs.

Actions log
Error: Can't find 'action.yml', 'action.yaml' or 'Dockerfile'
under '/home/runner/work/repo/repo/./.github/actions/setup'.

Common causes

Local path resolves against the wrong root

A ./relative uses: inside a composite is resolved relative to the action repository that defines the composite, not the consuming workflow checkout - so a path valid in the caller breaks inside the composite.

Nested action references a missing or untagged ref

A nested uses: owner/repo@ref must point at a real ref. Composites can nest other actions, but each reference still has to resolve independently.

How to fix it

Reference nested actions by owner/repo@ref, not local paths

Inside a composite shipped as its own repo, call other published actions by full ref so resolution does not depend on the caller layout.

action.yml (composite)
runs:
  using: composite
  steps:
    - uses: actions/setup-node@v4
      with:
        node-version: 20
    - run: npm ci
      shell: bash

Keep local nested actions inside the same repo

  1. For a composite living in the same repo as the workflow, a local nested action must be checked out and present at run time.
  2. Prefer publishing shared logic as its own tagged action over deep local nesting.
  3. Always give every nested step a shell: for run steps in a composite.

How to prevent it

  • Reference nested actions by full owner/repo@ref inside published composites.
  • Give every composite run step an explicit shell.
  • Test composites from a separate consuming repo, not just in-repo.

Frequently asked questions

What causes "Composite nested uses"?
A ./relative uses: inside a composite is resolved relative to the action repository that defines the composite, not the consuming workflow checkout - so a path valid in the caller breaks inside the composite.
How do I fix Composite nested uses?
Inside a composite shipped as its own repo, call other published actions by full ref so resolution does not depend on the caller layout.

Related guides

References

Latchkey auto-heals failures like this one - detected, fixed, and retried without you. Start free → 30-day trial · No credit card