The GitHub Actions runner failed to find the specified action, meaning a core component of your workflow couldn’t be initialized because it couldn’t locate its definition.
Here are the common reasons this happens, from most to least frequent:
1. Typo in Action Name or Owner
This is embarrassingly common. You mistyped the owner’s username or the repository name. GitHub Actions looks for actions in the format owner/repository. A single character off breaks it.
Diagnosis: Carefully compare the uses: line in your workflow YAML to the exact repository name on GitHub.
Fix: Correct the typo. For example, if the action is actions/checkout, ensure you haven’t written action/checkout or actions/checout.
Why it works: The runner performs an exact string match against known action repositories. A typo means it’s looking for a non-existent name.
2. Incorrect Action Version (Tag or Commit SHA)
You’re referencing a specific version of an action (like a Git tag or commit SHA) that doesn’t exist or is misspelled. Actions are versioned using Git tags (e.g., v1.2.3) or commit SHAs.
Diagnosis: Navigate to the action’s repository on GitHub. Check the "Releases" tab for valid tags or look at the commit history for valid SHAs.
Fix: Update your workflow to use a valid tag or SHA.
- uses: actions/checkout@v3 # Example: using a tag
or
- uses: actions/checkout@a1234567890abcdef # Example: using a commit SHA
Why it works: The runner fetches the action code at the specified commit or tag. If that reference is invalid, it can’t retrieve the action’s code.
3. Action Not Pushed to GitHub or Private Repository Access Issues
If you’re using a custom action from your own repository, ensure you’ve pushed the correct branch/tag containing the action. If it’s a private action, the repository where the action is defined must be accessible to the repository running the workflow.
Diagnosis:
- Public Action: Go to the action’s repository. Do you see the expected files (
action.yml, workflow files) and the tag/commit you’re referencing? - Private Action: In the workflow file, check if the
owner/repositorypart of theuses:statement points to a private repository. Ensure the PAT or token used to run the workflow has read access to that private repository.
Fix:
- Public Action: Push your changes and/or create the tag.
- Private Action:
- Grant read permissions to the
GITHUB_TOKENin the workflow that uses the private action (if it’s in the same organization). - If the action is in a different organization or needs broader access, use a Personal Access Token (PAT) with
reposcope and pass it as a secret to the workflow.
And in the workflow defining the action, ensure it’s set up to accept the token if necessary.- uses: your_org/your_private_action@main with: token: ${{ secrets.YOUR_PAT }} # If the action needs to access resources in its own repo - Grant read permissions to the
Why it works: The runner needs to clone the action’s repository to execute it. Access control prevents unauthorized cloning.
4. Using the Wrong Format for Local or Composite Actions
If you’re referencing an action defined in the same repository (local action) or a composite action, the uses: syntax is different.
Diagnosis:
- Local Action: You’re likely using
owner/repository@refwhen you should be using a relative path. - Composite Action: You’re trying to use it like a Docker or JavaScript action without the correct
runs:block in itsaction.yml.
Fix:
- Local Action: Use a relative path.
- uses: ./path/to/local/action - Composite Action: Ensure your
action.ymlfor the composite action has aruns:block specifying the steps.
Then reference it using# action.yml for a composite action name: 'My Composite Action' description: 'Does something cool' runs: using: "composite" steps: - uses: actions/checkout@v3 - run: echo "Hello from composite action" shell: bashowner/repository@refas usual.
Why it works: The runner has different mechanisms for finding and executing local, composite, Docker, and JavaScript actions. The uses: syntax dictates which mechanism is invoked.
5. action.yml Missing or Malformed
For any custom action (whether in the same repo or a separate one), the action.yml file is the manifest. If it’s missing, malformed, or not committed/tagged correctly, the runner cannot understand how to execute the action.
Diagnosis:
- Navigate to the root of the action’s repository. Is there an
action.ymlfile? - Use
yaml-lintor an online YAML validator to checkaction.ymlfor syntax errors. - Ensure the
name,description,inputs,outputs, andruns(ormain/script) fields are correctly structured.
Fix: Create or correct the action.yml file. Ensure it’s committed and, if using tags, that the tag points to a commit containing the correct action.yml.
Why it works: action.yml defines the action’s interface, inputs, outputs, and execution logic. Without a valid manifest, the runner has no instructions.
6. GitHub Enterprise Server (GHES) Specific Issues
If you’re on GHES, actions are typically sourced from a local mirror or a GitHub.com connection. Issues can arise if the mirror is out of sync or the connection is misconfigured.
Diagnosis:
- Check your GHES version and compare it to the latest release notes for known action-related bugs.
- Verify the GHES configuration for sourcing actions (e.g.,
actions.urlingit config). - If using a local mirror, ensure it’s up-to-date with the actions you need.
Fix:
- Update GHES if a known bug is present.
- Reconfigure the actions sourcing in GHES.
- Sync your local action mirror.
Why it works: GHES relies on its own infrastructure or configured connections to fetch actions. These mechanisms must be correctly set up and maintained.
The next error you’ll likely encounter is a Cannot find module or a similar runtime error within the action itself, indicating the action code was found but its internal dependencies or entry point are broken.