mirror of
https://github.com/docker/docs.git
synced 2026-03-27 22:38:54 +07:00
Remove usage of outdated GHCR_TOKEN (#13710)
* Remove usage of outdated GHCR_TOKEN
* Prefer {{ github.actor }} over {{ github.repository_owner }}
* Update language/java/configure-ci-cd.md with note about GITHUB_TOKEN
Co-authored-by: Usha Mandya <47779042+usha-mandya@users.noreply.github.com>
* Update language/nodejs/configure-ci-cd.md with note about GITHUB_TOKEN
Co-authored-by: Usha Mandya <47779042+usha-mandya@users.noreply.github.com>
* Update language/python/configure-ci-cd.md with note about GITHUB_TOKEN
Co-authored-by: Usha Mandya <47779042+usha-mandya@users.noreply.github.com>
Co-authored-by: Usha Mandya <47779042+usha-mandya@users.noreply.github.com>
This commit is contained in:
@@ -210,11 +210,16 @@ Next, change your Docker Hub login to a GitHub container registry login:
|
||||
uses: docker/login-action@v1
|
||||
with:
|
||||
registry: ghcr.io
|
||||
username: ${{ github.repository_owner }}
|
||||
password: ${{ secrets.GHCR_TOKEN }}
|
||||
username: ${{ github.actor }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
```
|
||||
{% endraw %}
|
||||
|
||||
To authenticate against the [GitHub Container Registry](https://docs.github.com/en/packages/working-with-a-github-packages-registry/working-with-the-container-registry), use the [`GITHUB_TOKEN`](https://docs.github.com/en/actions/reference/authentication-in-a-workflow) for the best security and experience.
|
||||
|
||||
You may need to [manage write and read access of GitHub Actions](https://docs.github.com/en/packages/managing-github-packages-using-github-actions-workflows/publishing-and-installing-a-package-with-github-actions#upgrading-a-workflow-that-accesses-ghcrio) for repositories in the container settings.
|
||||
|
||||
You can also use a [personal access token (PAT)](https://docs.github.com/en/github/authenticating-to-github/creating-a-personal-access-token) with the [appropriate scopes](https://docs.github.com/en/packages/getting-started-with-github-container-registry/migrating-to-github-container-registry-for-docker-images#authenticating-with-the-container-registry).
|
||||
Remember to change how the image is tagged. The following example keeps ‘latest’ as the only tag. However, you can add any logic to this if you prefer:
|
||||
|
||||
{% raw %}
|
||||
|
||||
Reference in New Issue
Block a user