Skip to content

Conversation

@polarctos
Copy link
Contributor

Version v4.5.0 introduced usage of the GitHub token for downloads.

Unfortunately this change was not backwards compatible on GitHub Enterprise instances (<company>.ghe.com) as the downloads require a token for github.com, and not the token from the dedicated GHE server/cloud which is present in github.token. Maybe a new major v5 would have been nice.

This PR just adds the github-token input to the readme to make it easier for GHE users to discover this input and to pass in a github.com token e.g. from a secret.

@crazy-max
Copy link
Member

crazy-max commented Nov 7, 2025

It was not put in the readme on purpose as the github token is not required:

required: false

Does it fail on your side? If so can you show some logs? Thanks!

@polarctos
Copy link
Contributor Author

When running on a action triggered from GitHub Enterprise Cloud, the error in the action log is: (with v4.5.0)

Download docker
  Downloading Docker latest from stable at download.docker.com
Error: Failed to get Docker releases from https://raw.githubusercontent.com/docker/actions-toolkit/main/.github/docker-releases.json with status code 404: 404: Not Found

In v4.4.0 the action works fine too.

When setting the input to a github.com token the download works fine too.

The main learning here is that ${{ github.token }} is not always a token for github.com but can also be for <>.ghe.com.

https://docs.github.com/en/enterprise-cloud@latest/admin/data-residency/network-details-for-ghecom

@polarctos
Copy link
Contributor Author

I think it is completely fine to rely on the default ${{ github.token }}, as this will do it for most users. And as the input is also available, the GHE users can also make it work, as it is the same requirement for lots of other setup-* actions. Having all the inputs in the readme too, makes it more convenient when setting the action up.

@crazy-max crazy-max merged commit f2e530b into docker:master Nov 28, 2025
37 of 47 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants