Most failures withDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/nhedger/setup-mago/llms.txt
Use this file to discover all available pages before exploring further.
nhedger/setup-mago fall into a small set of known categories: GitHub API rate limiting, version strings that don’t match any release, misconfigured working directories, unexpected version auto-detection results, and PATH propagation issues. The entries below cover each of these in detail.
GitHub API rate limit exceeded
GitHub API rate limit exceeded
Symptom: The action fails with an error message containing:Cause: The action makes GitHub API calls to the For high-traffic repositories or self-hosted runners that share a GitHub App token, supply a dedicated Personal Access Token (PAT) with at least public repository read access:Alternatively, you can set the
carthage-software/mago repository to find the right release and locate the correct binary asset. If those requests are unauthenticated, GitHub enforces a lower per-IP rate limit, which can be exhausted in busy CI environments or when many workflow runs trigger simultaneously.The action detects this condition by checking whether the x-ratelimit-remaining response header equals "0" on a 403 response from the GitHub API.Fix: Ensure the token input is set. The default value, ${{ github.token }}, uses the built-in job token and provides a higher authenticated rate limit that is sufficient for most repositories:GITHUB_TOKEN environment variable directly on the step, as suggested by the error message itself:Version not found
Version not found
Symptom: The action fails with the error:Cause: The version string passed to the
version input — or resolved through auto-detection — does not match any release tag in the carthage-software/mago repository. This can happen when:- The version string includes a
vprefix (e.g."v0.7.0"instead of"0.7.0"). - The version was mistyped.
- A pre-release or draft version was specified that is not yet publicly available.
v prefix:Working directory not found
Working directory not found
Symptom: The action emits the following warning and may install an unexpected version of Mago:Cause: The path provided to the
working-directory input does not exist on the runner at the time the action runs. This causes the action to silently fall back to the current working directory when searching for composer.lock and composer.json, which may not contain the expected version information.Fix: Double-check that the path is correct relative to the repository root, and ensure that the actions/checkout step runs before nhedger/setup-mago:Paths in
working-directory are resolved against the runner’s current working directory, which is typically the repository root after a checkout step.Wrong Mago version installed
Wrong Mago version installed
Symptom: Running
mago --version in a subsequent step reports a different version than expected.Cause: When the version input is left empty, the action attempts auto-detection in this order: composer.lock → composer.json → latest. If neither file contains a carthage-software/mago entry — or if working-directory points to the wrong location — the action silently falls through to latest, which may not be the version your project requires.Fix:-
Pin the version explicitly to eliminate any ambiguity:
-
Commit your
composer.lockand verify thatcarthage-software/magois listed underpackages-dev. The action reads theversionfield from that entry. -
Set
working-directoryif thecomposer.lockfile lives in a subdirectory: -
If you use a version range in
composer.json(e.g."^0.7.0"), be aware that the action installs the highest published release satisfying that range. Pin to an exact version to get deterministic installs.
Binary not found after setup
Binary not found after setup
Symptom: A step that runs after Cause: The action adds the directory containing the
nhedger/setup-mago fails with:mago binary to PATH using @actions/core addPath. In rare cases this may not take effect if:- A subsequent step overrides
PATHentirely via a customenv:block. - The action itself failed silently during extraction (check the action’s own step logs for errors).
nhedger/setup-mago step for any extraction errors. If the step completed successfully, check that no later step is replacing PATH: