这是indexloc提供的服务,不要输入任何密码
Skip to content

Switch from GHPR to GHCR for images #119

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Mar 22, 2022
Merged

Switch from GHPR to GHCR for images #119

merged 4 commits into from
Mar 22, 2022

Conversation

brrygrdn
Copy link
Contributor

@brrygrdn brrygrdn commented Mar 15, 2022

Our updater action currently retrieves the proxy images via the following namespaces:

  • docker.pkg.github.com/dependabot/dependabot-updater
  • docker.pkg.github.com/github/dependabot-update-job-proxy

These resources are hosted on the GitHub Package Registry's docker service which has been superseded by the GitHub Container Registry.

On the package pages for these two containers, we prefer to use their new namespaces:

There isn't a deprecation date for docker.pkg.github.com but we the fact we use the old service is more of a quirk of history than a design choice, so let's update it.

Changes

The primarily change is to the configuration and checks on the Docker package registries used, but a significant difference is that on ghcr.io, the public images do not require an authentication token at all.

Our existing code passed in the GITHUB_TOKEN from the action runner, which is accepted by both docker.pkg.github.com and ghcr.io when the action runs in cloud, however for GHES runners the GITHUB_TOKEN they receive is actually rejected by github.com as it originates from the instance.

Simply removing any auth from the call permits this to work as an anonymous pull regardless of the runner environment.

@brrygrdn brrygrdn force-pushed the brrygrdn/switch-to-ghcr branch from b31a4b1 to a5d1957 Compare March 15, 2022 15:31
@brrygrdn brrygrdn force-pushed the brrygrdn/switch-to-ghcr branch from a5d1957 to ab30b98 Compare March 18, 2022 20:40
@brrygrdn brrygrdn marked this pull request as ready for review March 21, 2022 20:14
@brrygrdn brrygrdn requested a review from a team March 22, 2022 09:52
@brrygrdn brrygrdn merged commit 361622a into main Mar 22, 2022
@brrygrdn brrygrdn deleted the brrygrdn/switch-to-ghcr branch March 22, 2022 11:06
@brrygrdn brrygrdn mentioned this pull request Mar 22, 2022
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.

2 participants