Files
github-slug-action/docs/how-to/troubleshooting.md
2026-03-12 14:02:09 +01:00

2.6 KiB

Troubleshooting

One of the environment variables doesn't work as intended

Warning

When you set a custom environment variable, you cannot use any of the default environment variable names. For a complete list of these, see Default environment variables. If you attempt to override the value of one of these default environment variables, the assignment is ignored.

If a variable starts to be used as a default environment variable by GitHub, the behaviour may differ depending on how you reference it:

  • ${{ env.GITHUB_AWESOME_VARIABLE }} serves the behaviour of this action
  • $GITHUB_AWESOME_VARIABLE serves the behaviour of GitHub Actions

If both expressions return the same value, the variable is not affected. Use the prefix input to avoid this issue entirely.

Important

If detected, the maintainers of this action will choose the best course of action depending on the impact.

An action could not be found at the URI

If your workflow fails on the Set up job task with this kind of log:

Download action repository 'rlespinasse/github-slug-action@GIT_REFERENCE'
##[error]An action could not be found at the URI 'https://api.github.com/repos/rlespinasse/github-slug-action/tarball/GIT_REFERENCE'

If the GIT_REFERENCE value is:

  • v4.x or after: following the end-of-life for a branch security process, this branch may have been deleted.
  • master: this branch no longer exists. Read more on the corresponding issue (EOL issue).

Use the current major tag v5 or a specific version tag (see releases) to fix your workflow.

Short variables are empty or have unexpected length

If GITHUB_SHA_SHORT is empty or shorter than expected, ensure you have checked out your repository before the action runs:

steps:
  - uses: actions/checkout@v6
  - uses: rlespinasse/github-slug-action@v5

Without a checkout, Git cannot determine the optimal short length for your repository. Alternatively, set a fixed short-length to avoid depending on the checkout:

steps:
  - uses: rlespinasse/github-slug-action@v5
    with:
      short-length: 7