1
0
mirror of synced 2025-12-22 19:34:15 -05:00

Packages content redesign (#18847)

* Add actions category name as first commit

* Package reorganization: rename articles for "Learning..." and "Managing..." categories (#18880)

* Initial prep work for Packages reorg

* Make changes for Learning and Managing categories

* Match file name to revised article title

* Rework packages guides (#18902)

* Create new directory

* Delete guides directory and index.md link

* Remove duplicated redirects to fix test

* fix folder name

* delete temporary directory of old content

* Add Gradle article

* Update landing page with new links

* Update test to fix CI failure for deleted articles

* Update links and titles for reorg-ed articles

* Fix broken links

Co-authored-by: hubwriter <hubwriter@github.com>

* Update more changed article titles in links (#18911)

* remove test line to test PR build failure

* Add sections to permissions article

* Add draft reusable

* restore versioning tests

* Remove accidental inclusion of new reusable from a different branch

* Package registry content redesign updates (#18930)

* Update container registry product variable

* First round of edits

* Update tidbit

* Apply suggestions from code review

Co-authored-by: hubwriter <hubwriter@github.com>

* Update docker-vs-container-registry.md

* Update authentication section to resolve bug/confusion

* Revisions

* Last touchups

* Migration from intro article

Co-authored-by: hubwriter <hubwriter@github.com>

* Add versioned diagrams

* Add packages actions revisions (#18956)

* Add refreshed content

* Update content/packages/managing-github-packages-using-github-actions-workflows/example-workflows-for-publishing-a-package.md

Due to tightness of time on this I'm going to commit this suggestion so that I can merge this PR into the Packages megabranch.

Co-authored-by: hubwriter <hubwriter@github.com>

* Packages reorg: "Introduction to GitHub Packages" article (#18906)

* Initial commit. Remove stray comma

* Initial CC work - WiP

* More changes for the Introduction article

* Make changes as per Jessica's review

* Fix broken reusable ref

* improve test failure message and add clarifying comments

* Packages reorganization: More updates to the 'Learn GitHub Packages' articles" (#18961)

* Viewing - WiP

* More updates to the 'Learn...' category

* revisions to intro article

* Add permissions article and make a few other streamlined updates

* Fix links 🌿

Co-authored-by: jmarlena <>

* Apply suggestions from code review

* Apply product input

* Fix versioning

* Apply some straight-forward suggested changes 

Co-authored-by: Lucas Costi <lucascosti@users.noreply.github.com>

* Apply suggestions from code review

* Add "GitHub Packages" before container registry mention

* Standardize visibility & permsisions section into a reusable

* Add link

* Replace outdated link

* Apply suggestions from code review

Co-authored-by: Lucas Costi <lucascosti@users.noreply.github.com>

* Apply suggestions from code review

Co-authored-by: Lucas Costi <lucascosti@users.noreply.github.com>

* Apply suggestions from code review

Co-authored-by: Lucas Costi <lucascosti@users.noreply.github.com>

* ✂️ cut note

* Apply suggestions from code review

Co-authored-by: Lucas Costi <lucascosti@users.noreply.github.com>

* Apply suggestions from code review

Co-authored-by: Lucas Costi <lucascosti@users.noreply.github.com>

* Superseded rewrite?

* bye single-use reusable

* Apply suggestions from code review

Co-authored-by: Lucas Costi <lucascosti@users.noreply.github.com>

* Condense packages & actions conceptual content

* Apply suggestions from code review

Co-authored-by: Lucas Costi <lucascosti@users.noreply.github.com>

* Apply suggestions from code review

* Apply suggestions from code review

Co-authored-by: Lucas Costi <lucascosti@users.noreply.github.com>

* remove "package registries"

* Apply suggestions from code review

Co-authored-by: Lucas Costi <lucascosti@users.noreply.github.com>

* Add reusable

* Add these redirects from the deleted containers conceptual article

* Incorporate changes from main into retitled articles 💫

* Missing endif

* Fix unexpected redirect behavior

* Revamp and consolidate actions access settings

* Further reading section

* Last fix for now

* standardize steps

* Apply suggestions from code review

Co-authored-by: Lucas Costi <lucascosti@users.noreply.github.com>

* Apply suggestions from code review

Co-authored-by: hubwriter <hubwriter@github.com>
Co-authored-by: Sarah Schneider <sarahs@github.com>
Co-authored-by: jmarlena <>
Co-authored-by: Lucas Costi <lucascosti@users.noreply.github.com>
This commit is contained in:
jmarlena
2021-04-30 16:28:27 -07:00
committed by GitHub
parent c8c30c57cd
commit e71021ae66
58 changed files with 511 additions and 487 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 198 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 178 KiB

View File

@@ -18,39 +18,7 @@ topics:
{% data reusables.actions.enterprise-github-hosted-runners %} {% data reusables.actions.enterprise-github-hosted-runners %}
{% data reusables.actions.ae-beta %} {% data reusables.actions.ae-beta %}
### About packaging steps {% data reusables.package_registry.about-packaging-and-actions %}
A packaging step is a common part of a continuous integration or continuous delivery workflow. After building and testing your application, a runnable or deployable artifact is produced in the form of a package. For example, a continuous integration workflow for a Java project may run `mvn package` to produce a JAR file. Or, a CI workflow for a Node.js application may create a Docker container.
Depending on the kind of application you're building, this package can be downloaded locally for manual testing, made available for users to download, or deployed to a staging or production environment.
### Packaging in continuous integration workflows
Creating a package at the end of a continuous integration workflow can help during code reviews on a pull request. After building and testing your code, a packaging step can produce a runnable or deployable artifact. Your workflow can then take that artifact and upload it as part of the workflow.
Now, when reviewing a pull request, you'll be able to look at the workflow run and download the artifact that was produced.
{% if currentVersion == "free-pro-team@latest" or currentVersion ver_gt "enterprise-server@3.0" or currentVersion == "github-ae@latest" %}
![Download artifact drop-down menu](/assets/images/help/repository/artifact-drop-down-updated.png)
{% else %}
![Download artifact drop-down menu](/assets/images/help/repository/artifact-drop-down.png)
{% endif %}
This will let you run the code in the pull request on your machine, which can help with debugging or testing the pull request.
### Workflows for publishing packages
In addition to uploading packaging artifacts for testing in a continuous integration workflow, you can create workflows that build your project and publish packages to a package registry.
* **Publish packages to {% data variables.product.prodname_registry %}**
{% data variables.product.prodname_registry %} can act as a package hosting service for many types of packages. You can choose to share your packages with all of {% data variables.product.prodname_dotcom %}, or private packages to share with collaborators or an organization. For more information, see "[About {% data variables.product.prodname_registry %}](/github/managing-packages-with-github-packages/about-github-packages)."
You may want to publish packages to {% data variables.product.prodname_registry %} on every push into the default branch. This will allow developers on your project to always be able to run and test the latest build out of the main branch easily, by installing it from {% data variables.product.prodname_registry %}.
* **Publish packages to a package registry**
For many projects, publishing to a package registry is performed whenever a new version of a project is released. For example, a project that produces a JAR file may upload new releases to the Maven Central repository. Or, a .NET project may produce a nuget package and upload it to the NuGet Gallery.
You can automate this by creating a workflow that publishes packages to a package registry on every release creation. For more information, see "[Creating releases](/github/administering-a-repository/creating-releases)."
### Further reading ### Further reading

View File

@@ -37,7 +37,7 @@ You might also find it helpful to have a basic understanding of the following:
- "[Encrypted secrets](/actions/reference/encrypted-secrets)" - "[Encrypted secrets](/actions/reference/encrypted-secrets)"
- "[Authentication in a workflow](/actions/reference/authentication-in-a-workflow)" - "[Authentication in a workflow](/actions/reference/authentication-in-a-workflow)"
- "[Configuring Docker for use with {% data variables.product.prodname_registry %}](/packages/using-github-packages-with-your-projects-ecosystem/configuring-docker-for-use-with-github-packages)" - "[Working with the Docker registry](/packages/working-with-a-github-packages-registry/working-with-the-docker-registry)"
### About image configuration ### About image configuration

View File

@@ -32,7 +32,7 @@ For more information about creating a CI workflow for your Java project with Gra
You may also find it helpful to have a basic understanding of the following: You may also find it helpful to have a basic understanding of the following:
- "[Configuring npm for use with {% data variables.product.prodname_registry %}](/github/managing-packages-with-github-packages/configuring-npm-for-use-with-github-packages)" - "[Working with the npm registry](/packages/working-with-a-github-packages-registry/working-with-the-npm-registry)"
- "[Environment variables](/actions/reference/environment-variables)" - "[Environment variables](/actions/reference/environment-variables)"
- "[Encrypted secrets](/actions/reference/encrypted-secrets)" - "[Encrypted secrets](/actions/reference/encrypted-secrets)"
- "[Authentication in a workflow](/actions/reference/authentication-in-a-workflow)" - "[Authentication in a workflow](/actions/reference/authentication-in-a-workflow)"

View File

@@ -32,7 +32,7 @@ For more information about creating a CI workflow for your Java project with Mav
You may also find it helpful to have a basic understanding of the following: You may also find it helpful to have a basic understanding of the following:
- "[Configuring npm for use with {% data variables.product.prodname_registry %}](/github/managing-packages-with-github-packages/configuring-npm-for-use-with-github-packages)" - "[Working with the npm registry](/packages/working-with-a-github-packages-registry/working-with-the-npm-registry)"
- "[Environment variables](/actions/reference/environment-variables)" - "[Environment variables](/actions/reference/environment-variables)"
- "[Encrypted secrets](/actions/reference/encrypted-secrets)" - "[Encrypted secrets](/actions/reference/encrypted-secrets)"
- "[Authentication in a workflow](/actions/reference/authentication-in-a-workflow)" - "[Authentication in a workflow](/actions/reference/authentication-in-a-workflow)"

View File

@@ -33,7 +33,7 @@ For more information about creating a CI workflow for your Node.js project, see
You may also find it helpful to have a basic understanding of the following: You may also find it helpful to have a basic understanding of the following:
- "[Configuring npm for use with {% data variables.product.prodname_registry %}](/github/managing-packages-with-github-packages/configuring-npm-for-use-with-github-packages)" - "[Working with the npm registry](/packages/working-with-a-github-packages-registry/working-with-the-npm-registry)"
- "[Environment variables](/actions/reference/environment-variables)" - "[Environment variables](/actions/reference/environment-variables)"
- "[Encrypted secrets](/actions/reference/encrypted-secrets)" - "[Encrypted secrets](/actions/reference/encrypted-secrets)"
- "[Authentication in a workflow](/actions/reference/authentication-in-a-workflow)" - "[Authentication in a workflow](/actions/reference/authentication-in-a-workflow)"

View File

@@ -695,11 +695,11 @@ jobs:
``` ```
{% if currentVersion == "free-pro-team@latest" %} {% if currentVersion == "free-pro-team@latest" %}
##### Example using the {% data variables.product.prodname_github_container_registry %} ##### Example using the {% data variables.product.prodname_registry %} {% data variables.product.prodname_capitalized_container_registry %}
`docker://{host}/{image}:{tag}` `docker://{host}/{image}:{tag}`
A Docker image in the {% data variables.product.prodname_github_container_registry %}. A Docker image in the {% data variables.product.prodname_registry %} {% data variables.product.prodname_capitalized_container_registry %}.
```yaml ```yaml
jobs: jobs:

View File

@@ -18,7 +18,7 @@ Subdomain isolation mitigates cross-site scripting and other related vulnerabili
When subdomain isolation is enabled, {% data variables.product.prodname_ghe_server %} replaces several paths with subdomains. When subdomain isolation is enabled, {% data variables.product.prodname_ghe_server %} replaces several paths with subdomains.
{% if currentVersion == "enterprise-server@2.22" %} {% if currentVersion == "enterprise-server@2.22" %}
To use Docker with {% data variables.product.prodname_registry %}, you must also enable subdomain isolation. For more information, see "[Configuring Docker for use with {% data variables.product.prodname_registry %}](/enterprise/{{ currentVersion }}/user/packages/using-github-packages-with-your-projects-ecosystem/configuring-docker-for-use-with-github-packages)." To use Docker with {% data variables.product.prodname_registry %}, you must also enable subdomain isolation. For more information, see "[Working with the Docker registry](/enterprise/{{ currentVersion }}/user/packages/working-with-a-github-packages-registry/working-with-the-docker-registry)."
{% data reusables.package_registry.packages-ghes-release-stage %} {% data reusables.package_registry.packages-ghes-release-stage %}

View File

@@ -14,7 +14,11 @@ topics:
{% data reusables.package_registry.packages-spending-limit-brief %} For more information, see "[About spending limits](#about-spending-limits)." {% data reusables.package_registry.packages-spending-limit-brief %} For more information, see "[About spending limits](#about-spending-limits)."
{% data reusables.package_registry.container-registry-beta-billing-note %} {% note %}
**Billing update for container image storage:** During the beta phase of the {% data variables.product.prodname_capitalized_container_registry %}, Docker image storage and bandwidth are free for both the previous `docker.pkg.github.com` and current `ghcr.io` hosting services. For more information, see "[Introduction to {% data variables.product.prodname_registry %}](/packages/learn-github-packages/introduction-to-github-packages)."
{% endnote %}
If you purchased {% data variables.product.prodname_enterprise %} through a Microsoft Enterprise Agreement, you can connect your Azure Subscription ID to your enterprise account to enable and pay for {% data variables.product.prodname_registry %} usage beyond the amounts including with your account. For more information, see "[Connecting an Azure subscription to your enterprise](/github/setting-up-and-managing-your-enterprise/connecting-an-azure-subscription-to-your-enterprise)." If you purchased {% data variables.product.prodname_enterprise %} through a Microsoft Enterprise Agreement, you can connect your Azure Subscription ID to your enterprise account to enable and pay for {% data variables.product.prodname_registry %} usage beyond the amounts including with your account. For more information, see "[Connecting an Azure subscription to your enterprise](/github/setting-up-and-managing-your-enterprise/connecting-an-azure-subscription-to-your-enterprise)."

View File

@@ -1,95 +0,0 @@
---
title: About GitHub Container Registry
intro: 'You can use {% data variables.product.prodname_github_container_registry %} to seamlessly host and manage Docker container images in your organization or personal user account on {% data variables.product.prodname_dotcom %}. {% data variables.product.prodname_github_container_registry %} allows you to configure who can manage and access packages using fine-grained permissions.'
product: '{% data reusables.gated-features.packages %}'
redirect_from:
- /packages/getting-started-with-github-container-registry/about-github-container-registry
- /packages/managing-container-images-with-github-container-registry
versions:
free-pro-team: '*'
---
{% note %}
**Note:** {% data variables.product.prodname_github_container_registry %} is currently in public beta and subject to change. During the beta, storage and bandwidth are free. To use {% data variables.product.prodname_github_container_registry %}, you must enable the feature for your account. For more information, see "[Enabling improved container support](/packages/guides/enabling-improved-container-support)."
{% endnote %}
### About {% data variables.product.prodname_github_container_registry %}
{% data reusables.package_registry.container-registry-feature-highlights %}
To share context about your package's use, you can link a repository to your container image on {% data variables.product.prodname_dotcom %}. For more information, see "[Connecting a repository to a container image](/packages/guides/connecting-a-repository-to-a-container-image)."
{% data variables.product.prodname_github_container_registry %} has different hosting locations, permission, and visibility than other package registries.
| | Package registries | {% data variables.product.prodname_github_container_registry %} |
|----|----|----|
| Hosting locations | You can host multiple packages in one repository. | You can host multiple container images in one organization or user account. |
| Permissions | Each package inherits the permissions of the repository where the package is hosted. <br> <br> For example, anyone with read permissions for a repository can install a package as a dependency in a project, and anyone with write permissions can publish a new package version. | For each container image, you can choose the access level that others have. The permissions for container image access are separate from your organization and repository permissions.
Visibility | {% data reusables.package_registry.public-or-private-packages %} | You can set the visibility of each of your container images. A private container image is only visible to people and teams who are given access within your organization. A public container image is visible to anyone. |
Anonymous access | N/A | You can access public container images anonymously.
For more information, see "[About scopes and permissions for {% data variables.product.prodname_github_container_registry %}](#about-scopes-and-permissions-for-github-container-registry)."
### Supported formats
The {% data variables.product.prodname_container_registry %} currently supports the following container image formats:
* [Docker Image Manifest V2, Schema 2](https://docs.docker.com/registry/spec/manifest-v2-2/)
* [Open Container Initiative (OCI) Specifications](https://github.com/opencontainers/image-spec)
The {% data variables.product.prodname_github_container_registry %} hosts containers at `ghcr.io/OWNER/IMAGE-NAME`.
| Package client | Language | Package format | Description |
| --- | --- | --- | --- |
| Docker CLI | N/A | `Dockerfile` | Docker container support. |
#### Manifest Lists/Image Indexes
{% data variables.product.prodname_github_container_registry %} also supports [Docker Manifest List](https://docs.docker.com/registry/spec/manifest-v2-2/#manifest-list)/[OCI Image Index](https://github.com/opencontainers/image-spec/blob/79b036d80240ae530a8de15e1d21c7ab9292c693/image-index.md) formats which are defined in the Docker V2, Schema 2 and OCI image specifications.
### Visibility and access permissions for container images
If you have admin permissions to a container image, you can set the container image to private or public. Public images allow anonymous access and can be pulled without authentication or signing in via the CLI.
As an admin, you can also grant access permissions for a container image that are separate from the permissions you've set at the organization and repository levels.
For container images published and owned by a user account, you can give any person an access role. For container images published and owned by an organization, you can give any person or team in the organization an access role.
| Permission role | Access description |
|-----|----|
| Read | Can download package. <br> Can read package metadata. |
| Write | Can upload and download this package. <br> Can read and write package metadata. |
| Admin | Can upload, download, delete, and manage this package. <br> Can read and write package metadata. <br> Can grant package permissions.
For more information, see "[Configuring access control and visibility for container images](/packages/guides/configuring-access-control-and-visibility-for-container-images)."
### About scopes and permissions for {% data variables.product.prodname_github_container_registry %}
To use or manage a package hosted by a package registry, you must use a token with the appropriate scope, and your user account must have appropriate permissions for that repository.
| Scope | Description |
| --- | --- |
|`read:packages`| Download and install container images from {% data variables.product.prodname_github_container_registry %} |
|`write:packages`| Upload and publish container images to {% data variables.product.prodname_github_container_registry %} |
| `delete:packages` | Delete specified versions of private or public container images from {% data variables.product.prodname_github_container_registry %}. For more information, see "[Deleting and restoring a package](/packages/learn-github-packages/deleting-and-restoring-a-package)." |
To learn about available scopes and permissions for container images, see "[Configuring access control and visibility for container images](/packages/guides/configuring-access-control-and-visibility-for-container-images)."
For more information, see "[Creating a personal access token](/github/authenticating-to-github/creating-a-personal-access-token/)" and "[Available scopes](/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/#available-scopes)."
### About billing for {% data variables.product.prodname_github_container_registry %}
{% data reusables.package_registry.billing-for-container-registry %}
### Contacting support
If you have feedback or feature requests for {% data variables.product.prodname_github_container_registry %}, use the [feedback form](https://support.github.com/contact/feedback?contact%5Bcategory%5D=packages).
Contact {% data variables.contact.github_support %} about {% data variables.product.prodname_github_container_registry %} using [our contact form](https://support.github.com/contact?form%5Bsubject%5D=Re:%20GitHub%20Packages) if:
* You experience anything that contradicts the documentation.
* You encounter vague or unclear errors.
* Your published package contains sensitive data, such as GDPR violations, API Keys, or personally-identifying information.

View File

@@ -1,11 +0,0 @@
---
title: Container guides for GitHub Packages
shortTitle: Container guides for GitHub Packages
intro: 'You can publish and retrieve Docker images using {% data variables.product.prodname_registry %}.'
mapTopic: true
versions:
free-pro-team: '*'
enterprise-server: '>=2.22'
github-ae: '*'
---

View File

@@ -1,40 +0,0 @@
---
title: Enabling improved container support
intro: 'To use {% data variables.product.prodname_github_container_registry %}, you must enable it for your user or organization account.'
product: '{% data reusables.gated-features.packages %}'
redirect_from:
- /packages/getting-started-with-github-container-registry/enabling-improved-container-support
versions:
free-pro-team: '*'
---
{% note %}
**Note:** {% data variables.product.prodname_github_container_registry %} is currently in public beta and subject to change. During the beta, storage and bandwidth are free. For more information, see "[About {% data variables.product.prodname_github_container_registry %}](/packages/getting-started-with-github-container-registry/about-github-container-registry)."
{% endnote %}
### Enabling {% data variables.product.prodname_github_container_registry %} for your personal account
Once {% data variables.product.prodname_github_container_registry %} is enabled for your personal user account, you can publish containers to {% data variables.product.prodname_github_container_registry %} owned by your user account.
To use {% data variables.product.prodname_github_container_registry %} within an organization, the organization owner must enable the feature for organization members.
{% data reusables.feature-preview.feature-preview-setting %}
2. On the left, select "Improved container support", then click **Enable**.
![Improved container support](/assets/images/help/settings/improved-container-support.png)
### Enabling {% data variables.product.prodname_github_container_registry %} for your organization account
Before organization owners or members can publish container images to {% data variables.product.prodname_github_container_registry %}, an organization owner must enable the feature preview for the organization.
{% data reusables.profile.access_org %}
{% data reusables.profile.org_settings %}
4. On the left, click **Packages**.
5. Under "Improved container support", select "Enable improved container support" and click **Save**.
![Enable container registry support option and save button](/assets/images/help/package-registry/enable-improved-container-support-for-orgs.png)
6. Under "Container creation", choose whether you want to enable the creation of public, private, or internal container images.
- To enable organization members to create public container images, click **Public**.
- To enable organization members to create private container images that are only visible to other organization members, click **Private**. You can further customize the visibility of private container images. For more information, see "[Configuring access control and visibility for container images](/packages/managing-container-images-with-github-container-registry/configuring-access-control-and-visibility-for-container-images)."
- **For {% data variables.product.prodname_ghe_cloud %} only:** To enable organization members to create internal container images that are only visible to other organization members, click **Internal**.
![Visibility options for container images published by organization members](/assets/images/help/package-registry/container-creation-org-settings.png)

View File

@@ -1,33 +0,0 @@
---
title: Guides
shortTitle: Guides
intro: 'These guides help you configure {% data variables.product.prodname_actions %} or your package client to work with {% data variables.product.prodname_registry %}.'
redirect_from:
- /github/managing-packages-with-github-packages/using-github-packages-with-your-projects-ecosystem
- /packages/using-github-packages-with-your-projects-ecosystem
versions:
free-pro-team: '*'
enterprise-server: '>=2.22'
github-ae: '*'
---
{% data reusables.package_registry.packages-ghes-release-stage %}
{% data reusables.package_registry.packages-ghae-release-stage %}
### Table of Contents
{% topic_link_in_list /package-client-guides-for-github-packages %}
{% link_in_list /using-github-packages-with-github-actions %}
{% link_in_list /configuring-apache-maven-for-use-with-github-packages %}
{% link_in_list /configuring-gradle-for-use-with-github-packages %}
{% link_in_list /configuring-npm-for-use-with-github-packages %}
{% link_in_list /configuring-dotnet-cli-for-use-with-github-packages %}
{% link_in_list /configuring-rubygems-for-use-with-github-packages %}
{% topic_link_in_list /container-guides-for-github-packages %}
{% link_in_list /configuring-docker-for-use-with-github-packages %}
{% link_in_list /about-github-container-registry %}
{% link_in_list /migrating-to-github-container-registry-for-docker-images %}
{% link_in_list /enabling-improved-container-support %}
{% link_in_list /configuring-access-control-and-visibility-for-container-images %}
{% link_in_list /connecting-a-repository-to-a-container-image %}
{% link_in_list /pushing-and-pulling-docker-images %}

View File

@@ -1,11 +0,0 @@
---
title: Package client guides for GitHub Packages
shortTitle: Package client guides for GitHub Packages
intro: 'You can publish and retrieve package client images using {% data variables.product.prodname_registry %}.'
mapTopic: true
versions:
free-pro-team: '*'
enterprise-server: '>=2.22'
github-ae: '*'
---

View File

@@ -8,17 +8,17 @@ introLinks:
featuredLinks: featuredLinks:
guides: guides:
- /packages/learn-github-packages - /packages/learn-github-packages
- /packages/guides/using-github-packages-with-github-actions - /packages/managing-github-packages-using-github-actions-workflows
- /packages/manage-packages/installing-a-package - /packages/learn-github-packages/installing-a-package
popular: popular:
- /packages/guides/configuring-npm-for-use-with-github-packages - /packages/working-with-a-github-packages-registry/working-with-the-npm-registry
- /packages/guides/configuring-docker-for-use-with-github-packages - /packages/working-with-a-github-packages-registry/working-with-the-docker-registry
- /packages/learn-github-packages - /packages/learn-github-packages
- /packages/guides/configuring-apache-maven-for-use-with-github-packages - /packages/working-with-a-github-packages-registry/working-with-the-apache-maven-registry
guideCards: guideCards:
- /packages/guides/configuring-npm-for-use-with-github-packages - /packages/working-with-a-github-packages-registry/working-with-the-docker-registry
- /packages/guides/enabling-improved-container-support - /packages/working-with-a-github-packages-registry/enabling-improved-container-support-with-the-container-registry
- /packages/guides/configuring-rubygems-for-use-with-github-packages - /packages/working-with-a-github-packages-registry/working-with-the-rubygems-registry
changelog: changelog:
label: 'packages' label: 'packages'
prefix: 'Packages: ' prefix: 'Packages: '
@@ -33,7 +33,8 @@ versions:
github-ae: '*' github-ae: '*'
--- ---
<!--This section is needed to determine the order of the left sidebar for now-->
<!-- {% link_with_intro /quickstart %} --> <!-- {% link_with_intro /quickstart %} -->
<!-- {% link_with_intro /guides %} -->
<!-- {% link_with_intro /learn-github-packages %} --> <!-- {% link_with_intro /learn-github-packages %} -->
<!-- {% link_with_intro /manage-packages %} --> <!-- {% link_with_intro /working-with-a-github-packages-registry %} -->
<!-- {% link_with_intro /managing-github-packages-using-github-actions-workflows %} -->

View File

@@ -0,0 +1,83 @@
---
title: About permissions for GitHub Packages
intro: 'Learn about how to manage permissions for your packages.'
product: '{% data reusables.gated-features.packages %}'
versions:
free-pro-team: '*'
enterprise-server: '>=2.22'
github-ae: '*'
---
{% if currentVersion == "free-pro-team@latest" %}
The permissions for packages are either repository-scoped or user/organization-scoped.
{% endif %}
### Permissions for repository-scoped packages
A repository-scoped package inherits the permissions and visibility of the repository that owns the package. You can find a package scoped to a repository by going to the main page of the repository and clicking the **Packages** link to the right of the page.
The {% data variables.product.prodname_registry %} registries below use repository-scoped permissions:
- Docker registry (`docker.pkg.github.com`)
- npm registry
- RubyGems registry
- Apache Maven registry
- NuGet registry
{% if currentVersion == "free-pro-team@latest" %}
### Granular permissions for user/organization-scoped packages
Packages with granular permissions are scoped to a personal user or organization account. You can change the access control and visibility of the package separately from a repository that is connected (or linked) to a package.
Currently, only the {% data variables.product.prodname_capitalized_container_registry %} offers granular permissions for your container image packages.
### Visibility and access permissions for container images
{% data reusables.package_registry.visibility-and-access-permissions %}
For more information, see "[Configuring a package's access control and visibility](/packages/learn-github-packages/configuring-a-packages-access-control-and-visibility)."
{% endif %}
### About scopes and permissions for package registries
To use or manage a package hosted by a package registry, you must use a token with the appropriate scope, and your user account must have appropriate permissions.
For example:
- To download and install packages from a repository, your token must have the `read:packages` scope, and your user account must have read permission.
- {% if currentVersion == "free-pro-team@latest" or if currentVersion ver_gt "enterprise-server@3.0" %}To delete a package on {% data variables.product.product_name %}, your token must at least have the `delete:packages` and `read:packages` scope. The `repo` scope is also required for repo-scoped packages.{% elsif currentVersion ver_lt "enterprise-server@3.1" %}To delete a specified version of a private package on {% data variables.product.product_name %}, your token must have the `delete:packages` and `repo` scope. Public packages cannot be deleted.{% elsif currentVersion == "github-ae@latest" %}To delete a specified version of a package on {% data variables.product.product_name %}, your token must have the `delete:packages` and `repo` scope.{% endif %} For more information, see "{% if currentVersion == "free-pro-team@latest" or currentVersion ver_gt "enterprise-server@3.0" %}[Deleting and restoring a package](/packages/learn-github-packages/deleting-and-restoring-a-package){% elsif currentVersion ver_lt "enterprise-server@3.1" or currentVersion == "github-ae@latest" %}[Deleting a package](/packages/learn-github-packages/deleting-a-package){% endif %}."
| Scope | Description | Required permission |
| --- | --- | --- |
|`read:packages`| Download and install packages from {% data variables.product.prodname_registry %} | read |
|`write:packages`| Upload and publish packages to {% data variables.product.prodname_registry %} | write |
| `delete:packages` | {% if currentVersion == "free-pro-team@latest" or currentVersion ver_gt "enterprise-server@3.0" %} Delete packages from {% data variables.product.prodname_registry %} {% elsif currentVersion ver_lt "enterprise-server@3.1" %} Delete specified versions of private packages from {% data variables.product.prodname_registry %}{% elsif currentVersion == "github-ae@latest" %} Delete specified versions of packages from {% data variables.product.prodname_registry %} {% endif %} | admin |
| `repo` | Upload and delete packages (along with `write:packages`, or `delete:packages`) | write or admin |
When you create a {% data variables.product.prodname_actions %} workflow, you can use the `GITHUB_TOKEN` to publish and install packages in {% data variables.product.prodname_registry %} without needing to store and manage a personal access token.
For more information, see:{% if currentVersion == "free-pro-team@latest" %}
- "[Configuring a packages access control and visibility](/packages/learn-github-packages/configuring-a-packages-access-control-and-visibility)"{% endif %}
- "[Publishing and installing a package with {% data variables.product.prodname_actions %}](/packages/managing-github-packages-using-github-actions-workflows/publishing-and-installing-a-package-with-github-actions)"
- "[Creating a personal access token](/github/authenticating-to-github/creating-a-personal-access-token/)"
- "[Available scopes](/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/#available-scopes)"
### Maintaining access to packages in {% data variables.product.prodname_actions %} workflows
To ensure your workflows will maintain access to your packages, ensure that you're using the right access token in your workflow and that you've enabled {% data variables.product.prodname_actions %} access to your package.
For more conceptual background on {% data variables.product.prodname_actions %} or examples of using packages in workflows, see "[Managing GitHub Packages using GitHub Actions workflows](/packages/managing-github-packages-using-github-actions-workflows)."
#### Access tokens
- To publish packages associated with the workflow repository, use `GITHUB_TOKEN`.
- To install packages associated with other private repositories that `GITHUB_TOKEN` can't access, use a personal access token
For more information about `GITHUB_TOKEN` used in {% data variables.product.prodname_actions %} workflows, see "[Authentication in a workflow](/actions/reference/authentication-in-a-workflow#using-the-github_token-in-a-workflow)."
{% if currentVersion == "free-pro-team@latest" %}
#### {% data variables.product.prodname_actions %} access for container images
To ensure your workflows have access to your container image, you must enable {% data variables.product.prodname_actions %} access to the repositories where your workflow is run. You can find this setting on your package's settings page. For more information, see "[Ensuring workflow access to your package](/packages/learn-github-packages/configuring-a-packages-access-control-and-visibility#ensuring-workflow-access-to-your-package)."
{% endif %}

View File

@@ -1,18 +1,31 @@
--- ---
title: Configuring access control and visibility for container images title: Configuring a package's access control and visibility
intro: 'Choose who has read, write, or admin access to your container image and the visibility of your container images on {% data variables.product.prodname_dotcom %}.' intro: 'Choose who has read, write, or admin access to your container image and the visibility of your container images on {% data variables.product.prodname_dotcom %}.'
product: '{% data reusables.gated-features.packages %}' product: '{% data reusables.gated-features.packages %}'
redirect_from: redirect_from:
- /packages/managing-container-images-with-github-container-registry/configuring-access-control-and-visibility-for-container-images - /packages/managing-container-images-with-github-container-registry/configuring-access-control-and-visibility-for-container-images
- /packages/guides/configuring-access-control-and-visibility-for-container-images
versions: versions:
free-pro-team: '*' free-pro-team: '*'
--- ---
{% data reusables.package_registry.container-registry-beta %} {% data reusables.package_registry.container-registry-beta %}
Packages with granular permissions are scoped to a personal user or organization account. You can change the access control and visibility of a package separately from the repository that it is connected (or linked) to.
Currently, only the {% data variables.product.prodname_capitalized_container_registry %} offers granular permissions for your container image packages.
For more information about permissions for repository-scoped packages, packages-related scopes for PATs, or managing permissions for your actions workflows, see "[About permissions for GitHub Packages](/packages/learn-github-packages/about-permissions-for-github-packages)."
### Visibility and access permissions for container images
{% data reusables.package_registry.visibility-and-access-permissions %}
### Configuring access to container images for your personal account ### Configuring access to container images for your personal account
If you have admin permissions to a user-account owned container image, you can assign read, write, or admin roles to other users. For more information about these permission roles, see "[Visibility and access permissions for container images](/packages/getting-started-with-github-container-registry/about-github-container-registry#visibility-and-access-permissions-for-container-images)." If you have admin permissions to a container image that's owned by a user account, you can assign read, write, or admin roles to other users. For more information about these permission roles, see "[Visibility and access permissions for container images](#visibility-and-access-permissions-for-container-images)."
If your package is private or internal and owned by an organization, then you can only give access to other organization members or teams.
{% data reusables.package_registry.package-settings-from-user-level %} {% data reusables.package_registry.package-settings-from-user-level %}
1. On the package settings page, click **Invite teams or people** and enter the name, username, or email of the person you want to give access. Teams cannot be given access to a container image owned by a user account. 1. On the package settings page, click **Invite teams or people** and enter the name, username, or email of the person you want to give access. Teams cannot be given access to a container image owned by a user account.
@@ -24,11 +37,11 @@ The selected users will automatically be given access and don't need to accept a
### Configuring access to container images for an organization ### Configuring access to container images for an organization
If you have admin permissions to an organization-owned container image, you can assign read, write, or admin roles to other users and teams. For more information about these permission roles, see "[Visibility and access permissions for container images](/packages/getting-started-with-github-container-registry/about-github-container-registry#visibility-and-access-permissions-for-container-images)." If you have admin permissions to an organization-owned container image, you can assign read, write, or admin roles to other users and teams. For more information about these permission roles, see "[Visibility and access permissions for container images](#visibility-and-access-permissions-for-container-images)."
If your package is private or internal and owned by an organization, then you can only give access to other organization members or teams. If your package is private or internal and owned by an organization, then you can only give access to other organization members or teams.
For organization image containers, organizations admins must enable packages before you can set the visibility to public. For more information, see "[Enabling improved container support](/packages/getting-started-with-github-container-registry/enabling-improved-container-support)." For organization image containers, organizations admins must enable packages before you can set the visibility to public. For more information, see "[Enabling improved container support with the Container registry](/packages/working-with-a-github-packages-registry/enabling-improved-container-support-with-the-container-registry)."
{% data reusables.package_registry.package-settings-from-org-level %} {% data reusables.package_registry.package-settings-from-org-level %}
1. On the package settings page, click **Invite teams or people** and enter the name, username, or email of the person you want to give access. You can also enter a team name from the organization to give all team members access. 1. On the package settings page, click **Invite teams or people** and enter the name, username, or email of the person you want to give access. You can also enter a team name from the organization to give all team members access.
@@ -58,10 +71,24 @@ The specified repository does not need to be the repository where the source cod
{% note %} {% note %}
**Note:** Syncing your container image with a repository through the **Actions access** menu option is different than connecting your container to a repository. For more information about linking a repository to your container, see "[Connecting a repository to a container image](/packages/guides/connecting-a-repository-to-a-container-image)." **Note:** Syncing your container image with a repository through the **Actions access** menu option is different than connecting your container to a repository. For more information about linking a repository to your container, see "[Connecting a repository to a package](/packages/learn-github-packages/connecting-a-repository-to-a-package)."
{% endnote %} {% endnote %}
#### {% data variables.product.prodname_actions %} access for user-account-owned container images
{% data reusables.package_registry.package-settings-from-user-level %}
1. In the left sidebar, click **Actions access**.
!["Actions access" option in left menu](/assets/images/help/package-registry/organization-repo-access-for-a-package.png)
2. To ensure your workflow has access to your container package, you must add the repository where the workflow is stored. Click **Add repository** and search for the repository you want to add.
!["Add repository" button](/assets/images/help/package-registry/add-repository-button.png)
3. Using the "role" drop-down menu, select the default access level that you'd like the repository to have to your container image.
![Permission access levels to give to repositories](/assets/images/help/package-registry/repository-permission-options-for-package-access-through-actions.png)
To further customize access to your container image, see "[Configuring access to container images for your personal account](#configuring-access-to-container-images-for-your-personal-account)."
#### {% data variables.product.prodname_actions %} access for organization-owned container images
{% data reusables.package_registry.package-settings-from-org-level %} {% data reusables.package_registry.package-settings-from-org-level %}
1. In the left sidebar, click **Actions access**. 1. In the left sidebar, click **Actions access**.
!["Actions access" option in left menu](/assets/images/help/package-registry/organization-repo-access-for-a-package.png) !["Actions access" option in left menu](/assets/images/help/package-registry/organization-repo-access-for-a-package.png)
@@ -108,7 +135,7 @@ When you first publish a package, the default visibility is private and only you
A public package can be accessed anonymously without authentication. Once you make your package public, you cannot make your package private again. A public package can be accessed anonymously without authentication. Once you make your package public, you cannot make your package private again.
For organization image containers, organizations admins must enable public packages before you can set the visibility to public. For more information, see "[Enabling improved container support](/packages/getting-started-with-github-container-registry/enabling-improved-container-support)." For organization image containers, organizations admins must enable public packages before you can set the visibility to public. For more information, see "[Enabling improved container support with the Container registry](/packages/working-with-a-github-packages-registry/enabling-improved-container-support-with-the-container-registry)."
{% data reusables.package_registry.package-settings-from-org-level %} {% data reusables.package_registry.package-settings-from-org-level %}
5. Under "Danger Zone", choose a visibility setting: 5. Under "Danger Zone", choose a visibility setting:

View File

@@ -1,34 +1,29 @@
--- ---
title: Connecting a repository to a container image title: Connecting a repository to a package
intro: 'You can link a repository with a container image locally and on {% data variables.product.prodname_dotcom %}.' intro: 'You can connect a repository to a container image on {% data variables.product.prodname_dotcom %}.'
product: '{% data reusables.gated-features.packages %}' product: '{% data reusables.gated-features.packages %}'
redirect_from: redirect_from:
- /packages/managing-container-images-with-github-container-registry/connecting-a-repository-to-a-container-image - /packages/managing-container-images-with-github-container-registry/connecting-a-repository-to-a-container-image
- /packages/guides/connecting-a-repository-to-a-container-image
versions: versions:
free-pro-team: '*' free-pro-team: '*'
--- ---
When you link a container image with a repository, the package landing page will show information and links from the repository, such as the README. By connecting a repository to a package, the package landing page will show information and links from the repository, such as the README.
To connect a repository and a container image on {% data variables.product.prodname_dotcom %}, they must share the same owner on {% data variables.product.prodname_dotcom %}. For example, both `my_repo` and `hello_docker` are owned by the user `monalisa`: ### Connecting a repository to a user-owned package on {% data variables.product.prodname_dotcom %}
```shell
https://github.com/monalisa/my_repo
https://github.com/monalisa/hello_docker
```
### Connecting a repository to a user-owned container image on {% data variables.product.prodname_dotcom %}
{% data reusables.package_registry.package-settings-from-user-level %} {% data reusables.package_registry.package-settings-from-user-level %}
{% data reusables.package_registry.repository_connection_steps %} {% data reusables.package_registry.repository_connection_steps %}
### Connecting a repository to an organization-owned container image on {% data variables.product.prodname_dotcom %} ### Connecting a repository to an organization-owned package on {% data variables.product.prodname_dotcom %}
{% data reusables.package_registry.package-settings-from-org-level %} {% data reusables.package_registry.package-settings-from-org-level %}
{% data reusables.package_registry.repository_connection_steps %} {% data reusables.package_registry.repository_connection_steps %}
### Connecting a repository to a container image on the command line ### Connecting a repository to a container image using the command line
1. In your Dockerfile, add this line, replacing `OWNER` and `REPO` with your details: 1. In your Dockerfile, add this line, replacing `OWNER` and `REPO` with your details:
@@ -64,14 +59,14 @@ https://github.com/monalisa/hello_docker
$ docker tag 38f737a91f39 ghcr.io/monalisa/hello_docker:latest $ docker tag 38f737a91f39 ghcr.io/monalisa/hello_docker:latest
``` ```
5. If you haven't already, authenticate to {% data variables.product.prodname_github_container_registry %}. For more information, see "[Authenticating to GitHub Container Registry](/packages/managing-container-images-with-github-container-registry/pushing-and-pulling-docker-images#authenticating-to-github-container-registry)." 5. If you haven't already, authenticate to the {% data variables.product.prodname_capitalized_container_registry %}. For more information, see "[Authenticating to the {% data variables.product.prodname_capitalized_container_registry %}](/packages/managing-container-images-with-github-container-registry/pushing-and-pulling-docker-images#authenticating-to-the-container-registry)."
{% raw %} {% raw %}
```shell ```shell
$ echo $CR_PAT | docker login ghcr.io -u USERNAME --password-stdin $ echo $CR_PAT | docker login ghcr.io -u USERNAME --password-stdin
> Login Succeeded > Login Succeeded
``` ```
{% endraw %} {% endraw %}
6. Push your container image to {% data variables.product.prodname_github_container_registry %}. 6. Push your container image to the {% data variables.product.prodname_capitalized_container_registry %}.
```shell ```shell
$ docker push ghcr.io/OWNER/IMAGE-NAME:TAG $ docker push ghcr.io/OWNER/IMAGE-NAME:TAG
``` ```

View File

@@ -1,30 +0,0 @@
---
title: Core concepts for GitHub Packages
intro: 'Below is a list of common {% data variables.product.prodname_registry %} terms we use across our sites and documentation.'
product: '{% data reusables.gated-features.packages %}'
redirect_from:
- /packages/getting-started-with-github-container-registry/core-concepts-for-github-container-registry
versions:
free-pro-team: '*'
enterprise-server: '>=2.22'
github-ae: '*'
---
{% data reusables.package_registry.packages-ghes-release-stage %}
{% data reusables.package_registry.packages-ghae-release-stage %}
### Package
A package is a self-contained and reusable piece of software that includes code and metadata that a developer bundles together in a common place for others to use. A package's metadata may include the version number, name, and the code's dependencies. Packages simplify using and distributing solutions to common problems such as needing frameworks for developing or testing a project, linters to improve code quality, or industry-standard machine learning tools to power your application. Packages exist in many ecosystems. For example, you can package Node.js and Java code or container images.
### Container
A container is a unit of software designed to reliably deploy software in a standardized way on any platform. A container operates as an isolated virtual environment or instance that can run various software packages and components on the same host kernel as your operating system. Containers use fewer resources than virtual machines because they don't need to include their own virtual hardware to run. Containers are created using a container image file, such as a Dockerfile, and a container client or runtime program.
### Container image
A container image is a type of package archive that specifies the software requirements to run an app from a container. A container image typically includes the app's code, libraries, and runtime instructions. To ensure that the same image details are used wherever an image is deployed and run, a container image is automatically versioned and cannot be changed once a container image is built in a container.
### Docker container
A Docker container is a type of open source container built on the Docker platform. Docker's original image format has become the OCI (Open Container Initiative) Image Specification. For more information, see the "[Docker documentation](https://docs.docker.com/get-started/overview/)."

View File

@@ -1,9 +1,13 @@
--- ---
title: Learn GitHub Packages title: Learn GitHub Packages
shortTitle: Learn GitHub Packages shortTitle: Learn GitHub Packages
intro: 'You can find out more about GitHub Packages, including publishing new packages to {% data variables.product.prodname_registry %}.' intro: 'You can find out more about using packages in GitHub, including publishing new packages to {% data variables.product.prodname_registry %}, view and install existing packages, and, in special circumstances, delete existing packages.'
redirect_from: redirect_from:
- /packages/getting-started-with-github-container-registry - /packages/getting-started-with-github-container-registry
- /github/managing-packages-with-github-packages/publishing-and-managing-packages
- /github/packages/publishing-and-managing-packages
- /packages/publishing-and-managing-packages
- /packages/manage-packages
versions: versions:
free-pro-team: '*' free-pro-team: '*'
enterprise-server: '>=2.22' enterprise-server: '>=2.22'
@@ -13,8 +17,12 @@ versions:
{% data reusables.package_registry.packages-ghes-release-stage %} {% data reusables.package_registry.packages-ghes-release-stage %}
{% data reusables.package_registry.packages-ghae-release-stage %} {% data reusables.package_registry.packages-ghae-release-stage %}
{% link_in_list /about-github-packages %} {% link_in_list /introduction-to-github-packages %}
{% link_in_list /core-concepts-for-github-packages %} {% link_in_list /about-permissions-for-github-packages %}
{% link_in_list /configuring-a-packages-access-control-and-visibility %}
{% link_in_list /connecting-a-repository-to-a-package %}
{% link_in_list /publishing-a-package %} {% link_in_list /publishing-a-package %}
{% link_in_list /viewing-packages %}
{% link_in_list /installing-a-package %}
{% link_in_list /deleting-and-restoring-a-package %} {% link_in_list /deleting-and-restoring-a-package %}
{% link_in_list /deleting-a-package %} {% link_in_list /deleting-a-package %}

View File

@@ -5,7 +5,8 @@ product: '{% data reusables.gated-features.packages %}'
redirect_from: redirect_from:
- /github/managing-packages-with-github-packages/installing-a-package - /github/managing-packages-with-github-packages/installing-a-package
- /packages/publishing-and-managing-packages/installing-a-package - /packages/publishing-and-managing-packages/installing-a-package
permissions: Anyone with read permissions for a repository can install a package from that repository. - /packages/manage-packages/installing-a-package
permissions: You can install any package that you have permission to view.
versions: versions:
free-pro-team: '*' free-pro-team: '*'
enterprise-server: '>=2.22' enterprise-server: '>=2.22'
@@ -25,7 +26,7 @@ After you find a package, you can read the package's description and installatio
You can install a package from {% data variables.product.prodname_registry %} using any {% if currentVersion == "free-pro-team@latest" or currentVersion == "github-ae@latest" %}supported package client{% else %}package type enabled for your instance{% endif %} by following the same general guidelines. You can install a package from {% data variables.product.prodname_registry %} using any {% if currentVersion == "free-pro-team@latest" or currentVersion == "github-ae@latest" %}supported package client{% else %}package type enabled for your instance{% endif %} by following the same general guidelines.
1. Authenticate to {% data variables.product.prodname_registry %} using the instructions for your package client. For more information, see "[About tokens](/packages/publishing-and-managing-packages/about-github-packages#authenticating-to-github-packages)." 1. Authenticate to {% data variables.product.prodname_registry %} using the instructions for your package client. For more information, see "[Authenticating to GitHub Packages](/packages/learn-github-packages/introduction-to-github-packages#authenticating-to-github-packages)."
2. Install the package using the instructions for your package client. 2. Install the package using the instructions for your package client.
For instructions specific to your package client, see "[Using {% data variables.product.prodname_registry %} with your project's ecosystem](/packages/using-github-packages-with-your-projects-ecosystem)." For instructions specific to your package client, see "[Working with a {% data variables.product.prodname_registry %} registry](/packages/working-with-a-github-packages-registry)."

View File

@@ -1,5 +1,5 @@
--- ---
title: About GitHub Packages title: Introduction to GitHub Packages
intro: '{% data variables.product.prodname_registry %} is a software package hosting service that allows you to host your software packages privately {% if currentVersion == "github-ae@latest" %} for specified users or internally for your enterprise{% else %}or publicly{% endif %} and use packages as dependencies in your projects.' intro: '{% data variables.product.prodname_registry %} is a software package hosting service that allows you to host your software packages privately {% if currentVersion == "github-ae@latest" %} for specified users or internally for your enterprise{% else %}or publicly{% endif %} and use packages as dependencies in your projects.'
product: '{% data reusables.gated-features.packages %}' product: '{% data reusables.gated-features.packages %}'
redirect_from: redirect_from:
@@ -7,6 +7,9 @@ redirect_from:
- /github/managing-packages-with-github-package-registry/about-github-package-registry - /github/managing-packages-with-github-package-registry/about-github-package-registry
- /github/managing-packages-with-github-packages/about-github-packages - /github/managing-packages-with-github-packages/about-github-packages
- /packages/publishing-and-managing-packages/about-github-packages - /packages/publishing-and-managing-packages/about-github-packages
- /packages/learn-github-packages/about-github-packages
- /packages/learn-github-packages/core-concepts-for-github-packages
- /packages/guides/about-github-container-registry
versions: versions:
free-pro-team: '*' free-pro-team: '*'
enterprise-server: '>=2.22' enterprise-server: '>=2.22'
@@ -22,35 +25,34 @@ versions:
You can integrate {% data variables.product.prodname_registry %} with {% data variables.product.product_name %} APIs, {% data variables.product.prodname_actions %}, and webhooks to create an end-to-end DevOps workflow that includes your code, CI, and deployment solutions. You can integrate {% data variables.product.prodname_registry %} with {% data variables.product.product_name %} APIs, {% data variables.product.prodname_actions %}, and webhooks to create an end-to-end DevOps workflow that includes your code, CI, and deployment solutions.
{% data variables.product.prodname_registry %} offers different package registries for commonly used packages, such as for Node, RubyGems, Apache Maven, Gradle, and Nuget. {% data variables.product.prodname_registry %} offers different package registries for commonly used package managers, such as npm, RubyGems, Apache Maven, Gradle, Docker, and NuGet. {% if currentVersion == "free-pro-team@latest" %}The {% data variables.product.prodname_capitalized_container_registry %} is optimized for containers and supports Docker and OCI images.{% endif %} For more information on the different package registries that {% data variables.product.prodname_registry %} supports, see "[Working with a {% data variables.product.prodname_registry %} registry](/packages/working-with-a-github-packages-registry)."
![Diagram showing packages support for npm, RubyGems, Apache Maven, Gradle, Nuget, and Docker](/assets/images/help/package-registry/packages-overview-diagram.png)
{% if currentVersion == "free-pro-team@latest" %} {% if currentVersion == "free-pro-team@latest" %}
{% data variables.product.prodname_registry %} also offers a {% data variables.product.prodname_container_registry %} designed to support the unique needs of container images. For more information, see "[About {% data variables.product.prodname_github_container_registry %}](/packages/guides/about-github-container-registry)."
{% data reusables.package_registry.container-registry-beta %} ![Diagram showing packages support for Docker, Container registry, RubyGems, npm, Apache Maven, NuGet, and Gradle](/assets/images/help/package-registry/packages-diagram-with-container-registry.png)
{% else %}
![Diagram showing packages support for Docker, RubyGems, npm, Apache Maven, Gradle, NuGet, and Docker](/assets/images/help/package-registry/packages-diagram-without-container-registry.png)
{% endif %} {% endif %}
#### Viewing packages You can view a package's README, as well as metadata such as licensing, download statistics, version history, and more on {% data variables.product.product_name %}. For more information, see "[Viewing packages](/packages/manage-packages/viewing-packages)."
You can review the package's README, some metadata like licensing, download statistics, version history, and more on {% data variables.product.product_name %}. For more information, see "[Viewing packages](/packages/manage-packages/viewing-packages)." #### Overview of package permissions and visibility
#### About package permissions and visibility | | |
|--------------------|--------------------|
| | Package registries | | Permissions | {% if currentVersion == "free-pro-team@latest" %}The permissions for a package are either inherited from the repository where the package is hosted or, for packages in the {% data variables.product.prodname_capitalized_container_registry %}, they can be defined for specific user or organization accounts. For more information, see "[Configuring a packages access control and visibility](/packages/learn-github-packages/configuring-a-packages-access-control-and-visibility)." {% else %}Each package inherits the permissions of the repository where the package is hosted. <br> <br> For example, anyone with read permissions for a repository can install a package as a dependency in a project, and anyone with write permissions can publish a new package version.{% endif %} |
|----|----|
| Hosting locations | You can host multiple packages in one repository. |
| Permissions | Each package inherits the permissions of the repository where the package is hosted. <br> <br> For example, anyone with read permissions for a repository can install a package as a dependency in a project, and anyone with write permissions can publish a new package version. |
| Visibility | {% data reusables.package_registry.public-or-private-packages %} | | Visibility | {% data reusables.package_registry.public-or-private-packages %} |
For more information, see "[About permissions for {% data variables.product.prodname_registry %}](/packages/learn-github-packages/about-permissions-for-github-packages)."
{% if currentVersion == "free-pro-team@latest" %} {% if currentVersion == "free-pro-team@latest" %}
### About billing for {% data variables.product.prodname_registry %} ### About billing for {% data variables.product.prodname_registry %}
{% data reusables.package_registry.packages-billing %} {% data reusables.package_registry.packages-spending-limit-brief %} For more information, see "[About billing for {% data variables.product.prodname_registry %}](/github/setting-up-and-managing-billing-and-payments-on-github/about-billing-for-github-packages)." {% data reusables.package_registry.packages-billing %} {% data reusables.package_registry.packages-spending-limit-brief %} For more information, see "[About billing for {% data variables.product.prodname_registry %}](/github/setting-up-and-managing-billing-and-payments-on-github/about-billing-for-github-packages)."
{% data reusables.package_registry.container-registry-beta-billing-note %}
{% endif %} {% endif %}
### Supported clients and formats ### Supported clients and formats
@@ -78,37 +80,15 @@ For more information about subdomain isolation, see "[Enabling subdomain isolati
{% endif %} {% endif %}
For more information about configuring your package client for use with {% data variables.product.prodname_registry %}, see "[Package client guides for {% data variables.product.prodname_registry %}](/packages/guides/package-client-guides-for-github-packages)." For more information about configuring your package client for use with {% data variables.product.prodname_registry %}, see "[Working with a {% data variables.product.prodname_registry %} registry](/packages/working-with-a-github-packages-registry)."
{% if currentVersion == "free-pro-team@latest" %} {% if currentVersion == "free-pro-team@latest" %}
For more information about Docker and {% data variables.product.prodname_github_container_registry %}, see "[Container guides for {% data variables.product.prodname_registry %}](/packages/guides/container-guides-for-github-packages)." For more information about Docker and the {% data variables.product.prodname_capitalized_container_registry %}, see "[Working with the Container registry](/packages/working-with-a-github-packages-registry/working-with-the-container-registry)" and "[Working with the Docker registry](/packages/working-with-a-github-packages-registry/working-with-the-docker-registry)."
{% endif %} {% endif %}
### Authenticating to {% data variables.product.prodname_registry %} ### Authenticating to {% data variables.product.prodname_registry %}
{% data reusables.package_registry.authenticate-packages %} {% data reusables.package_registry.authenticate-packages %}
### About scopes and permissions for package registries
To use or manage a package hosted by a package registry, you must use a token with the appropriate scope, and your user account must have appropriate permissions for that repository.
For example:
- To download and install packages from a repository, your token must have the `read:packages` scope, and your user account must have read permissions for the repository.
- {% if currentVersion == "free-pro-team@latest" or if currentVersion ver_gt "enterprise-server@3.0" %}To delete a package on {% data variables.product.product_name %}, your token must at least have the `delete:packages` and `read:packages` scope. The `repo` scope is also required for repo-scoped packages.{% elsif currentVersion ver_lt "enterprise-server@3.1" %}To delete a specified version of a private package on {% data variables.product.product_name %}, your token must have the `delete:packages` and `repo` scope. Public packages cannot be deleted.{% elsif currentVersion == "github-ae@latest" %}To delete a specified version of a package on {% data variables.product.product_name %}, your token must have the `delete:packages` and `repo` scope.{% endif %} For more information, see "{% if currentVersion == "free-pro-team@latest" or currentVersion ver_gt "enterprise-server@3.0" %}[Deleting and restoring a package](/packages/learn-github-packages/deleting-and-restoring-a-package){% elsif currentVersion ver_lt "enterprise-server@3.1" or currentVersion == "github-ae@latest" %}[Deleting a package](/packages/learn-github-packages/deleting-a-package){% endif %}."
| Scope | Description | Repository permissions |
| --- | --- | --- |
|`read:packages`| Download and install packages from {% data variables.product.prodname_registry %} | read |
|`write:packages`| Upload and publish packages to {% data variables.product.prodname_registry %} | write |
| `delete:packages` | {% if currentVersion == "free-pro-team@latest" or currentVersion ver_gt "enterprise-server@3.0" %} Delete packages from {% data variables.product.prodname_registry %} {% elsif currentVersion ver_lt "enterprise-server@3.1" %} Delete specified versions of private packages from {% data variables.product.prodname_registry %}{% elsif currentVersion == "github-ae@latest" %} Delete specified versions of packages from {% data variables.product.prodname_registry %} {% endif %} | admin |
| `repo` | Upload and delete packages (along with `write:packages`, or `delete:packages`) | write, or admin |
When you create a {% data variables.product.prodname_actions %} workflow, you can use the `GITHUB_TOKEN` to publish and install packages in {% data variables.product.prodname_registry %} without needing to store and manage a personal access token.
For more information, see:
- "[Using {% data variables.product.prodname_registry %} with {% data variables.product.prodname_actions %}](/packages/using-github-packages-with-your-projects-ecosystem/)"
- "[Creating a personal access token](/github/authenticating-to-github/creating-a-personal-access-token/)"
- "[Available scopes](/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/#available-scopes)"
### Managing packages ### Managing packages
{% if currentVersion == "free-pro-team@latest" %} {% if currentVersion == "free-pro-team@latest" %}

View File

@@ -19,7 +19,7 @@ versions:
You can help people understand and use your package by providing a description and other details like installation and usage instructions on the package page. {% data variables.product.product_name %} provides metadata for each version, such as the publication date, download activity, and recent versions. For an example package page, see [@Codertocat/hello-world-npm](https://github.com/Codertocat/hello-world-npm/packages/10696?version=1.0.1). You can help people understand and use your package by providing a description and other details like installation and usage instructions on the package page. {% data variables.product.product_name %} provides metadata for each version, such as the publication date, download activity, and recent versions. For an example package page, see [@Codertocat/hello-world-npm](https://github.com/Codertocat/hello-world-npm/packages/10696?version=1.0.1).
{% data reusables.package_registry.public-or-private-packages %} A repository can contain more than one package. To prevent confusion, make sure the README and description clearly provide information about each package. {% data reusables.package_registry.public-or-private-packages %} A repository can be connected to more than one package. To prevent confusion, make sure the README and description clearly provide information about each package.
{% if currentVersion == "free-pro-team@latest" %} {% if currentVersion == "free-pro-team@latest" %}
If a new version of a package fixes a security vulnerability, you should publish a security advisory in your repository. {% data variables.product.prodname_dotcom %} reviews each published security advisory and may use it to send {% data variables.product.prodname_dependabot_alerts %} to affected repositories. For more information, see "[About GitHub Security Advisories](/github/managing-security-vulnerabilities/about-github-security-advisories)." If a new version of a package fixes a security vulnerability, you should publish a security advisory in your repository. {% data variables.product.prodname_dotcom %} reviews each published security advisory and may use it to send {% data variables.product.prodname_dependabot_alerts %} to affected repositories. For more information, see "[About GitHub Security Advisories](/github/managing-security-vulnerabilities/about-github-security-advisories)."
@@ -29,10 +29,10 @@ If a new version of a package fixes a security vulnerability, you should publish
You can publish a package to {% data variables.product.prodname_registry %} using any {% if currentVersion == "free-pro-team@latest" or currentVersion == "github-ae@latest" %}supported package client{% else %}package type enabled for your instance{% endif %} by following the same general guidelines. You can publish a package to {% data variables.product.prodname_registry %} using any {% if currentVersion == "free-pro-team@latest" or currentVersion == "github-ae@latest" %}supported package client{% else %}package type enabled for your instance{% endif %} by following the same general guidelines.
1. Create or use an existing access token with the appropriate scopes for the task you want to accomplish. For more information, see "[About {% data variables.product.prodname_registry %}](/packages/publishing-and-managing-packages/about-github-packages#authenticating-to-github-packages)." 1. Create or use an existing access token with the appropriate scopes for the task you want to accomplish. For more information, see "[About permissions for {% data variables.product.prodname_registry %}](/packages/learn-github-packages/about-permissions-for-github-packages)."
2. Authenticate to {% data variables.product.prodname_registry %} using your access token and the instructions for your package client. 2. Authenticate to {% data variables.product.prodname_registry %} using your access token and the instructions for your package client.
3. Publish the package using the instructions for your package client. 3. Publish the package using the instructions for your package client.
For instructions specific to your package client, see "[Using {% data variables.product.prodname_registry %} with your project's ecosystem](/packages/using-github-packages-with-your-projects-ecosystem)." For instructions specific to your package client, see "[Working with a GitHub Packages registry](/packages/working-with-a-github-packages-registry)."
After you publish a package, you can view the package on {% data variables.product.prodname_dotcom %}. For more information, see [Viewing packages](/packages/publishing-and-managing-packages/viewing-packages). After you publish a package, you can view the package on {% data variables.product.prodname_dotcom %}. For more information, see "[Viewing packages](/packages/learn-github-packages/viewing-packages)."

View File

@@ -7,7 +7,8 @@ redirect_from:
- /github/managing-packages-with-github-packages/publishing-and-managing-packages/viewing-a-repositorys-packages - /github/managing-packages-with-github-packages/publishing-and-managing-packages/viewing-a-repositorys-packages
- /github/managing-packages-with-github-packages/viewing-packages - /github/managing-packages-with-github-packages/viewing-packages
- /packages/publishing-and-managing-packages/viewing-packages - /packages/publishing-and-managing-packages/viewing-packages
permissions: Anyone with read permissions to a repository can view the repository's packages. - /packages/manage-packages/viewing-packages
permissions: You must have at least read permissions to view a package.
versions: versions:
free-pro-team: '*' free-pro-team: '*'
enterprise-server: '>=2.22' enterprise-server: '>=2.22'
@@ -19,11 +20,15 @@ versions:
### About package views ### About package views
Packages must be installed at the repository level, but you can view all packages in an organization and all packages you've published. {% data reusables.package_registry.package-page-info %} Your ability to view a package depends on several factors. By default, you can view all packages you have published.
{% data reusables.package_registry.repo-scoped-and-granular-permissions-packages %}
{% data reusables.package_registry.package-page-info %}
### Viewing a repository's packages ### Viewing a repository's packages
You can see all the packages in a repository and search for a specific package in the repository. You can find and view a package located in a particular repository.
{% data reusables.repositories.navigate-to-repo %} {% data reusables.repositories.navigate-to-repo %}
{% data reusables.package_registry.packages-from-code-tab %} {% data reusables.package_registry.packages-from-code-tab %}
@@ -31,7 +36,7 @@ You can see all the packages in a repository and search for a specific package i
### Viewing an organization's packages ### Viewing an organization's packages
You can see all the packages installed in an organization and search for a specific package installed in an organization's repositories. You can find and view a package located in the repositories of an organization you belong to.
{% data reusables.profile.access_profile %} {% data reusables.profile.access_profile %}
{% data reusables.profile.access_org %} {% data reusables.profile.access_org %}
@@ -40,7 +45,7 @@ You can see all the packages installed in an organization and search for a speci
### Viewing your packages ### Viewing your packages
You can see all the packages you've installed and search for a specific package you've installed across all organizations and repositories. You can find and view any package you've published across all organizations and repositories.
{% data reusables.profile.access_profile %} {% data reusables.profile.access_profile %}
2. On the top of the profile page, in the main navigation, click **Packages**. 2. On the top of the profile page, in the main navigation, click **Packages**.

View File

@@ -1,19 +0,0 @@
---
title: Managing GitHub packages
shortTitle: Managing GitHub packages
intro: 'You can publish new packages to {% data variables.product.prodname_registry %}, view and install existing packages, and, in special circumstances, delete existing packages.'
redirect_from:
- /github/managing-packages-with-github-packages/publishing-and-managing-packages
- /github/packages/publishing-and-managing-packages
- /packages/publishing-and-managing-packages
versions:
free-pro-team: '*'
enterprise-server: '>=2.22'
github-ae: '*'
---
{% data reusables.package_registry.packages-ghes-release-stage %}
{% data reusables.package_registry.packages-ghae-release-stage %}
{% link_in_list /viewing-packages %}
{% link_in_list /installing-a-package %}

View File

@@ -0,0 +1,13 @@
---
title: About GitHub Packages and GitHub Actions
intro: Learn the fundamentals of managing packages through your {% data variables.product.prodname_actions %} workflows.
versions:
free-pro-team: '*'
enterprise-server: '>=2.22'
github-ae: '*'
---
{% data reusables.package_registry.packages-ghes-release-stage %}
{% data reusables.package_registry.packages-ghae-release-stage %}
{% data reusables.package_registry.about-packaging-and-actions %}

View File

@@ -0,0 +1,18 @@
---
title: Example workflows for publishing a package
intro: To help you get started with your own custom workflows, review some example workflows for publishing packages.
versions:
free-pro-team: '*'
enterprise-server: '>=2.22'
github-ae: '*'
---
{% data reusables.package_registry.packages-ghes-release-stage %}
{% data reusables.package_registry.packages-ghae-release-stage %}
You can find example workflows in "[Publishing and installing a package with {% data variables.product.prodname_actions %}](/packages/managing-github-packages-using-github-actions-workflows/publishing-and-installing-a-package-with-github-actions)" or in any of these {% data variables.product.prodname_actions %} guides:
- [Publishing Node.js packages](/actions/guides/publishing-nodejs-packages)
- [Publishing Docker images](/actions/guides/publishing-docker-images)
- [Publishing Java packages with Maven](/actions/guides/publishing-java-packages-with-maven)
- [Publishing Java packages with Gradle](/actions/guides/publishing-java-packages-with-gradle)

View File

@@ -0,0 +1,16 @@
---
title: Managing GitHub packages using GitHub Actions workflows
shortTitle: Managing GitHub packages with workflows
intro: 'You can safely publish and consume packages by building custom workflows that can also build, test, and deploy your code.'
versions:
free-pro-team: '*'
enterprise-server: '>=2.22'
github-ae: '*'
---
{% data reusables.package_registry.packages-ghes-release-stage %}
{% data reusables.package_registry.packages-ghae-release-stage %}
{% link_in_list /publishing-and-installing-a-package-with-github-actions %}
{% link_in_list /example-workflows-for-publishing-a-package %}
{% link_in_list /about-github-packages-and-github-actions %}

View File

@@ -1,10 +1,11 @@
--- ---
title: Using GitHub Packages with GitHub Actions title: Publishing and installing a package with GitHub Actions
intro: 'You can configure a workflow in {% data variables.product.prodname_actions %} to automatically publish or install a package from {% data variables.product.prodname_registry %}.' intro: 'You can configure a workflow in {% data variables.product.prodname_actions %} to automatically publish or install a package from {% data variables.product.prodname_registry %}.'
product: '{% data reusables.gated-features.packages %}' product: '{% data reusables.gated-features.packages %}'
redirect_from: redirect_from:
- /github/managing-packages-with-github-packages/using-github-packages-with-github-actions - /github/managing-packages-with-github-packages/using-github-packages-with-github-actions
- /packages/using-github-packages-with-your-projects-ecosystem/using-github-packages-with-github-actions - /packages/using-github-packages-with-your-projects-ecosystem/using-github-packages-with-github-actions
- /packages/guides/using-github-packages-with-github-actions
versions: versions:
free-pro-team: '*' free-pro-team: '*'
enterprise-server: '>=2.22' enterprise-server: '>=2.22'
@@ -23,7 +24,7 @@ versions:
You can extend the CI and CD capabilities of your repository by publishing or installing packages as part of your workflow. You can extend the CI and CD capabilities of your repository by publishing or installing packages as part of your workflow.
{% if currentVersion == "free-pro-team@latest" %} {% if currentVersion == "free-pro-team@latest" %}
#### Authenticating to {% data variables.product.prodname_github_container_registry %} #### Authenticating to the {% data variables.product.prodname_capitalized_container_registry %}
{% data reusables.package_registry.container-registry-beta %} {% data reusables.package_registry.container-registry-beta %}
@@ -74,7 +75,7 @@ These are more examples of how default permissions work for workflows that manag
| Upload a new version to an existing container | - If the container is private, internal, or public, only workflows running in repositories that are given write permission on that container can upload new versions to the container. | Upload a new version to an existing container | - If the container is private, internal, or public, only workflows running in repositories that are given write permission on that container can upload new versions to the container.
| Delete a container or versions of a container | - If the container is private, internal, or public, only workflows running in repositories that are given delete permission can delete existing versions of the container. | Delete a container or versions of a container | - If the container is private, internal, or public, only workflows running in repositories that are given delete permission can delete existing versions of the container.
You can also adjust access to containers in a more granular way or adjust some of the default permissions behavior. For more information, see "[Configuring access control and visibility for container images](/packages/guides/configuring-access-control-and-visibility-for-container-images)." You can also adjust access to containers in a more granular way or adjust some of the default permissions behavior. For more information, see "[Configuring a packages access control and visibility](/packages/learn-github-packages/configuring-a-packages-access-control-and-visibility)."
{% endif %} {% endif %}
@@ -369,10 +370,6 @@ You can install packages as part of your CI flow using {% data variables.product
Installing packages hosted by {% data variables.product.prodname_registry %} through {% data variables.product.prodname_actions %} requires minimal configuration or additional authentication when you use the `GITHUB_TOKEN`.{% if currentVersion == "free-pro-team@latest" %} Data transfer is also free when an action installs a package. For more information, see "[About billing for {% data variables.product.prodname_registry %}](/github/setting-up-and-managing-billing-and-payments-on-github/about-billing-for-github-packages)."{% endif %} Installing packages hosted by {% data variables.product.prodname_registry %} through {% data variables.product.prodname_actions %} requires minimal configuration or additional authentication when you use the `GITHUB_TOKEN`.{% if currentVersion == "free-pro-team@latest" %} Data transfer is also free when an action installs a package. For more information, see "[About billing for {% data variables.product.prodname_registry %}](/github/setting-up-and-managing-billing-and-payments-on-github/about-billing-for-github-packages)."{% endif %}
{% if currentVersion == "free-pro-team@latest" %}
The `GITHUB_TOKEN` cannot install packages from any private repository besides the repository where the action runs. You cannot currently use the `GITHUB_TOKEN` to authenticate to {% data variables.product.prodname_github_container_registry %}.
{% endif %}
{% data reusables.package_registry.actions-configuration %} {% data reusables.package_registry.actions-configuration %}
{% if currentVersion == "free-pro-team@latest" %} {% if currentVersion == "free-pro-team@latest" %}
@@ -389,7 +386,7 @@ Using the `GITHUB_TOKEN` instead of a PAT, which includes the `repo` scope, incr
!["Add repository" button](/assets/images/help/package-registry/add-repository-button.png) !["Add repository" button](/assets/images/help/package-registry/add-repository-button.png)
{% note %} {% note %}
**Note:** Adding a repository to your container through the **Actions access** menu option is different than connecting your container to a repository. For more information, see "[Ensuring workflow access to your package](/packages/guides/configuring-access-control-and-visibility-for-container-images#ensuring-workflow-access-to-your-package)" and "[Connecting a repository to a container image](/packages/guides/connecting-a-repository-to-a-container-image)." **Note:** Adding a repository to your container through the **Actions access** menu option is different than connecting your container to a repository. For more information, see "[Ensuring workflow access to your package](/packages/learn-github-packages/configuring-a-packages-access-control-and-visibility#ensuring-workflow-access-to-your-package)" and "[Connecting a repository to a package](/packages/learn-github-packages/connecting-a-repository-to-a-package)."
{% endnote %} {% endnote %}
3. Optionally, using the "role" drop-down menu, select the default access level that you'd like the repository to have to your container image. 3. Optionally, using the "role" drop-down menu, select the default access level that you'd like the repository to have to your container image.

View File

@@ -98,7 +98,7 @@ In this guide, you'll create a {% data variables.product.prodname_actions %} wor
### Viewing your published package ### Viewing your published package
Packages are published at the repository level. You can see all the packages in a repository and search for a specific package. You can view all of the packages you have published.
{% data reusables.repositories.navigate-to-repo %} {% data reusables.repositories.navigate-to-repo %}
{% data reusables.package_registry.packages-from-code-tab %} {% data reusables.package_registry.packages-from-code-tab %}
@@ -107,14 +107,14 @@ Packages are published at the repository level. You can see all the packages in
### Installing a published package ### Installing a published package
Now that you've published the package, you'll want to use it as a dependency across your projects. For more information, see "[Configuring npm for use with {% data variables.product.prodname_registry %}](/packages/guides/configuring-npm-for-use-with-github-packages#installing-a-package)." Now that you've published the package, you'll want to use it as a dependency across your projects. For more information, see "[Working with the npm registry](/packages/working-with-a-github-packages-registry/working-with-the-npm-registry#installing-a-package)."
### Next steps ### Next steps
The basic workflow you just added runs any time a new release is created in your repository. But, this is only the beginning of what you can do with {% data variables.product.prodname_registry %}. You can publish your package to multiple registries with a single workflow, trigger the workflow to run on different events such as a merged pull request, manage containers, and more. The basic workflow you just added runs any time a new release is created in your repository. But this is only the beginning of what you can do with {% data variables.product.prodname_registry %}. You can publish your package to multiple registries with a single workflow, trigger the workflow to run on different events such as a merged pull request, manage containers, and more.
Combining {% data variables.product.prodname_registry %} and {% data variables.product.prodname_actions %} can help you automate nearly every aspect of your application development processes. Ready to get started? Here are some helpful resources for taking your next steps with {% data variables.product.prodname_registry %} and {% data variables.product.prodname_actions %}: Combining {% data variables.product.prodname_registry %} and {% data variables.product.prodname_actions %} can help you automate nearly every aspect of your application development processes. Ready to get started? Here are some helpful resources for taking your next steps with {% data variables.product.prodname_registry %} and {% data variables.product.prodname_actions %}:
- "[Learn {% data variables.product.prodname_registry %}](/packages/learn-github-packages)" for an in-depth tutorial on GitHub Packages - "[Learn {% data variables.product.prodname_registry %}](/packages/learn-github-packages)" for an in-depth tutorial on GitHub Packages
- "[Learn {% data variables.product.prodname_actions %}](/actions/learn-github-actions)" for an in-depth tutorial on GitHub Actions - "[Learn {% data variables.product.prodname_actions %}](/actions/learn-github-actions)" for an in-depth tutorial on GitHub Actions
- "[Guides](/packages/guides)" for specific uses cases and examples - "[Working with a {% data variables.product.prodname_registry %} registry](/packages/working-with-a-github-packages-registry)" for specific uses cases and examples

View File

@@ -0,0 +1,44 @@
---
title: Enabling improved container support with the Container registry
intro: 'To use the {% data variables.product.prodname_capitalized_container_registry %}, you must enable it for your user or organization account.'
product: '{% data reusables.gated-features.packages %}'
redirect_from:
- /packages/getting-started-with-github-container-registry/enabling-improved-container-support
- /packages/guides/container-guides-for-github-packages/enabling-improved-container-support
- /packages/guides/enabling-improved-container-support
versions:
free-pro-team: '*'
---
{% note %}
**Note:** The {% data variables.product.prodname_capitalized_container_registry %} is currently in public beta and subject to change. During the beta, storage and bandwidth are free. For more information, see "[Introduction to {% data variables.product.prodname_registry %}](/packages/learn-github-packages/introduction-to-github-packages)."
{% endnote %}
{% data reusables.package_registry.docker-vs-container-registry %}
### Enabling the {% data variables.product.prodname_capitalized_container_registry %} for your personal account
Once the {% data variables.product.prodname_container_registry %} is enabled for your personal user account, you can publish containers to the {% data variables.product.prodname_container_registry %} owned by your user account.
To use the {% data variables.product.prodname_capitalized_container_registry %} within an organization, the organization owner must enable the feature for organization members.
{% data reusables.feature-preview.feature-preview-setting %}
2. On the left, select "Improved container support", then click **Enable**.
![Improved container support](/assets/images/help/settings/improved-container-support.png)
### Enabling the {% data variables.product.prodname_capitalized_container_registry %} for your organization account
Before organization owners or members can publish container images to the {% data variables.product.prodname_capitalized_container_registry %}, an organization owner must enable the feature preview for the organization.
{% data reusables.profile.access_org %}
{% data reusables.profile.org_settings %}
4. On the left, click **Packages**.
5. Under "Improved container support", select "Enable improved container support" and click **Save**.
![Enable container registry support option and save button](/assets/images/help/package-registry/enable-improved-container-support-for-orgs.png)
6. Under "Container creation", choose whether you want to enable the creation of public, private, or internal container images.
- To enable organization members to create public container images, select **Public**.
- To enable organization members to create private container images that are only visible to other organization members, select **Private**. You can further customize the visibility of private container images. For more information, see "[Configuring a package's access control and visibility](/packages/learn-github-packages/configuring-a-packages-access-control-and-visibility)."
- **For {% data variables.product.prodname_ghe_cloud %} only:** To enable organization members to create internal container images that are only visible to other organization members, select **Internal**.
![Visibility options for container images published by organization members](/assets/images/help/package-registry/container-creation-org-settings.png)

View File

@@ -0,0 +1,40 @@
---
title: Working with a GitHub Packages registry
shortTitle: Working with a GitHub Packages registry
intro: 'Learn how to use a supported {% data variables.product.prodname_registry %} registry.'
redirect_from:
- /github/managing-packages-with-github-packages/using-github-packages-with-your-projects-ecosystem
- /packages/using-github-packages-with-your-projects-ecosystem
- /packages/guides
- /packages/guides/package-client-guides-for-github-packages
- /packages/guides/container-guides-for-github-packages
versions:
free-pro-team: '*'
enterprise-server: '>=2.22'
github-ae: '*'
---
{% data reusables.package_registry.packages-ghes-release-stage %}
{% data reusables.package_registry.packages-ghae-release-stage %}
{% if currentVersion == "free-pro-team@latest" %}
![Diagram showing packages support for Docker, Container registry, RubyGems, npm, Apache Maven, NuGet, and Gradle](/assets/images/help/package-registry/packages-diagram-with-container-registry.png)
{% else %}
![Diagram showing packages support for Docker, RubyGems, npm, Apache Maven, Gradle, NuGet, and Docker](/assets/images/help/package-registry/packages-diagram-without-container-registry.png)
{% endif %}
### Table of Contents
{% link_in_list /working-with-the-npm-registry %}
{% link_in_list /working-with-the-rubygems-registry %}
{% link_in_list /working-with-the-apache-maven-registry %}
{% link_in_list /working-with-the-gradle-registry %}
{% link_in_list /working-with-the-nuget-registry %}
{% link_in_list /working-with-the-docker-registry %}
{% link_in_list /working-with-the-container-registry %}
{% link_in_list /enabling-improved-container-support-with-the-container-registry %}
{% link_in_list /migrating-to-the-container-registry-from-the-docker-registry %}

View File

@@ -1,26 +1,39 @@
--- ---
title: Migrating to GitHub Container Registry for Docker images title: Migrating to the Container registry from the Docker registry
intro: 'If you''ve used the GitHub Packages Docker registry to store Docker images, you can migrate to the new {% data variables.product.prodname_container_registry %}.' intro: 'If you''ve used the GitHub Packages Docker registry to store Docker images, you can migrate your images to the new {% data variables.product.prodname_container_registry %}.'
product: '{% data reusables.gated-features.packages %}' product: '{% data reusables.gated-features.packages %}'
redirect_from: redirect_from:
- /packages/getting-started-with-github-container-registry/migrating-to-github-container-registry-for-docker-images - /packages/getting-started-with-github-container-registry/migrating-to-github-container-registry-for-docker-images
- /packages/guides/container-guides-for-github-packages/migrating-to-github-container-registry-for-docker-images
- /packages/guides/migrating-to-github-container-registry-for-docker-images
versions: versions:
free-pro-team: '*' free-pro-team: '*'
--- ---
### Key differences between {% data variables.product.prodname_github_container_registry %} and the Docker package registry ### Key differences between the {% data variables.product.prodname_capitalized_container_registry %} and the Docker registry
{% data reusables.package_registry.container-registry-beta %} {% data reusables.package_registry.container-registry-beta %}
The {% data variables.product.prodname_github_container_registry %} supersedes the existing Packages Docker registry and is optimized to support some of the unique needs of containers. The {% data variables.product.prodname_capitalized_container_registry %} supersedes the existing {% data variables.product.prodname_registry %} Docker registry and is optimized to support some of the unique needs of containers.
{% data reusables.package_registry.container-registry-feature-highlights %} With the {% data variables.product.prodname_capitalized_container_registry %} you can:
- Store container images within your organization and user account, rather than a repository.
- Set granular permissions and visibility independently of repository permissions and visibility.
- Access public container images anonymously.
For more information, see "[About {% data variables.product.prodname_github_container_registry %}](/packages/getting-started-with-github-container-registry/about-github-container-registry)." | | Docker registry| {% data variables.product.prodname_capitalized_container_registry %} |
|-------------------|--------------------|----|
| Hosting locations | You can host multiple Docker images in one repository. | You can host multiple container images in one organization or user account. |
| Permissions | Each image inherits the permissions of the repository where the image is hosted. <br> <br> For example, anyone with read permissions for a repository can install a package as a dependency in a project, and anyone with write permissions can publish a new package version. | For each container image, you can choose the access level that others have. The permissions for container image access are separate from your organization and repository permissions.
Visibility | {% data reusables.package_registry.public-or-private-packages %} | You can set the visibility of each of your container images. A private container image is only visible to people and teams who are given access within your organization. A public container image is visible to anyone. |
Anonymous access | N/A | You can access public container images anonymously.
Foreign layer support | Doesn't support foreign layers, such as Windows images. | Supports foreign layers, such as Windows images.
### Billing changes ### Billing changes
{% data reusables.package_registry.billing-for-container-registry %} During the {% data variables.product.prodname_capitalized_container_registry %} beta, both the new {% data variables.product.prodname_container_registry %} and the existing {% data variables.product.prodname_registry %} Docker registry are free of charge. For more information about the {% data variables.product.prodname_registry %} Docker registry, see "[Working with the Docker registry](/packages/working-with-a-github-packages-registry/working-with-the-docker-registry)."
After the beta, the same billing and storage rates that other {% data variables.product.prodname_registry %} registries use will apply to the {% data variables.product.prodname_capitalized_container_registry %}. For more information, see "[About billing for {% data variables.product.prodname_registry %}](/github/setting-up-and-managing-billing-and-payments-on-github/about-billing-for-github-packages)."
### Domain changes ### Domain changes
@@ -29,9 +42,9 @@ The domain for the {% data variables.product.prodname_container_registry %} is `
| Registry | Example URL | | Registry | Example URL |
|-----------------|-------------| |-----------------|-------------|
| {% data variables.product.prodname_registry %} Docker registry | `docker.pkg.github.com/OWNER/REPOSITORY/IMAGE_NAME` | {% data variables.product.prodname_registry %} Docker registry | `docker.pkg.github.com/OWNER/REPOSITORY/IMAGE_NAME`
| {% data variables.product.prodname_github_container_registry %} | `ghcr.io/OWNER/IMAGE_NAME` | {% data variables.product.prodname_capitalized_container_registry %} | `ghcr.io/OWNER/IMAGE_NAME`
### Authenticating with the container registry ### Authenticating to the {% data variables.product.prodname_capitalized_container_registry %}
{% data reusables.package_registry.feature-preview-for-container-registry %} {% data reusables.package_registry.feature-preview-for-container-registry %}
@@ -82,7 +95,7 @@ If you have a {% data variables.product.prodname_actions %} workflow that uses a
2. In your {% data variables.product.prodname_actions %} workflow file, update the package url from `https://docker.pkg.github.com` to `ghcr.io`. 2. In your {% data variables.product.prodname_actions %} workflow file, update the package url from `https://docker.pkg.github.com` to `ghcr.io`.
3. Add your new {% data variables.product.prodname_container_registry %} authentication personal access token (PAT) as a GitHub Actions secret. {% data variables.product.prodname_github_container_registry %} does not support using `GITHUB_TOKEN` for your PAT so you must use a different custom variable, such as `CR_PAT`. For more information, see "[Creating and storing encrypted secrets](/actions/configuring-and-managing-workflows/creating-and-storing-encrypted-secrets)." 3. Add your new {% data variables.product.prodname_container_registry %} authentication personal access token (PAT) as a GitHub Actions secret. The {% data variables.product.prodname_capitalized_container_registry %} does not support using `GITHUB_TOKEN` for your PAT so you must use a different custom variable, such as `CR_PAT`. For more information, see "[Creating and storing encrypted secrets](/actions/configuring-and-managing-workflows/creating-and-storing-encrypted-secrets)."
4. In your {% data variables.product.prodname_actions %} workflow file, update the authentication PAT by replacing your Docker registry PAT ({% raw %}`${{ secrets.GITHUB_TOKEN }}`{% endraw %}) with a new variable for your {% data variables.product.prodname_container_registry %} PAT, such as {% raw %}`${{ secrets.CR_PAT }}`{% endraw %}. 4. In your {% data variables.product.prodname_actions %} workflow file, update the authentication PAT by replacing your Docker registry PAT ({% raw %}`${{ secrets.GITHUB_TOKEN }}`{% endraw %}) with a new variable for your {% data variables.product.prodname_container_registry %} PAT, such as {% raw %}`${{ secrets.CR_PAT }}`{% endraw %}.

View File

@@ -1,5 +1,5 @@
--- ---
title: Configuring Apache Maven for use with GitHub Packages title: Working with the Apache Maven registry
intro: 'You can configure Apache Maven to publish packages to {% data variables.product.prodname_registry %} and to use packages stored on {% data variables.product.prodname_registry %} as dependencies in a Java project.' intro: 'You can configure Apache Maven to publish packages to {% data variables.product.prodname_registry %} and to use packages stored on {% data variables.product.prodname_registry %} as dependencies in a Java project.'
product: '{% data reusables.gated-features.packages %}' product: '{% data reusables.gated-features.packages %}'
redirect_from: redirect_from:
@@ -7,6 +7,7 @@ redirect_from:
- /github/managing-packages-with-github-package-registry/configuring-apache-maven-for-use-with-github-package-registry - /github/managing-packages-with-github-package-registry/configuring-apache-maven-for-use-with-github-package-registry
- /github/managing-packages-with-github-packages/configuring-apache-maven-for-use-with-github-packages - /github/managing-packages-with-github-packages/configuring-apache-maven-for-use-with-github-packages
- /packages/using-github-packages-with-your-projects-ecosystem/configuring-apache-maven-for-use-with-github-packages - /packages/using-github-packages-with-your-projects-ecosystem/configuring-apache-maven-for-use-with-github-packages
- /packages/guides/configuring-apache-maven-for-use-with-github-packages
versions: versions:
free-pro-team: '*' free-pro-team: '*'
enterprise-server: '>=2.22' enterprise-server: '>=2.22'
@@ -122,10 +123,6 @@ If your instance has subdomain isolation disabled:
``` ```
{% endif %} {% endif %}
#### Authenticating with the `GITHUB_TOKEN`
{% data reusables.package_registry.package-registry-with-github-tokens %}
### Publishing a package ### Publishing a package
{% data reusables.package_registry.default-name %} For example, {% data variables.product.prodname_dotcom %} will publish a package named `com.example:test` in a repository called `OWNER/test`. {% data reusables.package_registry.default-name %} For example, {% data variables.product.prodname_dotcom %} will publish a package named `com.example:test` in a repository called `OWNER/test`.
@@ -189,5 +186,5 @@ To install an Apache Maven package from {% data variables.product.prodname_regis
### Further reading ### Further reading
- "[Configuring Gradle for use with {% data variables.product.prodname_registry %}](/packages/guides/configuring-gradle-for-use-with-github-packages)" - "[Working with the Gradle registry](/packages/working-with-a-github-packages-registry/working-with-the-gradle-registry)"
- "{% if currentVersion == "free-pro-team@latest" or currentVersion ver_gt "enterprise-server@3.0" %}[Deleting and restoring a package](/packages/learn-github-packages/deleting-and-restoring-a-package){% elsif currentVersion ver_lt "enterprise-server@3.1" or currentVersion == "github-ae@latest" %}[Deleting a package](/packages/learn-github-packages/deleting-a-package){% endif %}" - "{% if currentVersion == "free-pro-team@latest" or currentVersion ver_gt "enterprise-server@3.0" %}[Deleting and restoring a package](/packages/learn-github-packages/deleting-and-restoring-a-package){% elsif currentVersion ver_lt "enterprise-server@3.1" or currentVersion == "github-ae@latest" %}[Deleting a package](/packages/learn-github-packages/deleting-a-package){% endif %}"

View File

@@ -1,18 +1,33 @@
--- ---
title: Pushing and pulling Docker images title: Working with the Container registry
intro: 'You can store and manage Docker images in {% data variables.product.prodname_github_container_registry %}.' intro: 'You can store and manage Docker and OCI images in the {% data variables.product.prodname_capitalized_container_registry %}, which uses the package namespace `https://ghcr.io`.'
product: '{% data reusables.gated-features.packages %}' product: '{% data reusables.gated-features.packages %}'
redirect_from: redirect_from:
- /packages/managing-container-images-with-github-container-registry/pushing-and-pulling-docker-images - /packages/managing-container-images-with-github-container-registry/pushing-and-pulling-docker-images
- /packages/guides/container-guides-for-github-packages/pushing-and-pulling-docker-images
- /packages/guides/pushing-and-pulling-docker-images
- /packages/getting-started-with-github-container-registry/about-github-container-registry
- /packages/managing-container-images-with-github-container-registry
versions: versions:
free-pro-team: '*' free-pro-team: '*'
--- ---
{% data reusables.package_registry.container-registry-beta %} {% data reusables.package_registry.container-registry-beta %}
To push and pull container images owned by an organization, an organization admin must enable {% data variables.product.prodname_github_container_registry %} for the organization. For more information, see "[Enabling improved container support](/packages/getting-started-with-github-container-registry/enabling-improved-container-support)." {% data reusables.package_registry.docker-vs-container-registry %}
### Authenticating to {% data variables.product.prodname_github_container_registry %} ### About {% data variables.product.prodname_container_registry %} support
To push and pull container images, an organization admin or the owner of a personal account must enable the {% data variables.product.prodname_capitalized_container_registry %}. For more information, see "[Enabling improved container support with the {% data variables.product.prodname_capitalized_container_registry %}](/packages/working-with-a-github-packages-registry/enabling-improved-container-support-with-the-container-registry)."
When installing or publishing a Docker image, the Container registry supports foreign layers, such as Windows images.
The {% data variables.product.prodname_capitalized_container_registry %} currently supports the following container image formats:
* [Docker Image Manifest V2, Schema 2](https://docs.docker.com/registry/spec/manifest-v2-2/)
* [Open Container Initiative (OCI) Specifications](https://github.com/opencontainers/image-spec)
### Authenticating to the {% data variables.product.prodname_capitalized_container_registry %}
{% data reusables.package_registry.authenticate_with_pat_for_container_registry %} {% data reusables.package_registry.authenticate_with_pat_for_container_registry %}
@@ -30,7 +45,7 @@ This example pushes the `2.5` version of the image.
$ docker push ghcr.io/OWNER/IMAGE-NAME:2.5 $ docker push ghcr.io/OWNER/IMAGE-NAME:2.5
``` ```
When you first publish a package, the default visibility is private. To change the visibility or set access permissions, see "[Configuring access control and visibility for container images](/packages/managing-container-images-with-github-container-registry/configuring-access-control-and-visibility-for-container-images)." When you first publish a package, the default visibility is private. To change the visibility or set access permissions, see "[Configuring a package's access control and visibility](/packages/learn-github-packages/configuring-a-packages-access-control-and-visibility)."
### Pulling container images ### Pulling container images

View File

@@ -1,12 +1,14 @@
--- ---
title: Configuring Docker for use with GitHub Packages title: Working with the Docker registry
intro: 'You can configure the Docker client to use {% data variables.product.prodname_registry %} to publish and retrieve docker images.' intro: 'You can push and pull your Docker images using the {% data variables.product.prodname_registry %} Docker registry, which uses the package namespace `https://docker.pkg.github.com`.'
product: '{% data reusables.gated-features.packages %}' product: '{% data reusables.gated-features.packages %}'
redirect_from: redirect_from:
- /articles/configuring-docker-for-use-with-github-package-registry - /articles/configuring-docker-for-use-with-github-package-registry
- /github/managing-packages-with-github-package-registry/configuring-docker-for-use-with-github-package-registry - /github/managing-packages-with-github-package-registry/configuring-docker-for-use-with-github-package-registry
- /github/managing-packages-with-github-packages/configuring-docker-for-use-with-github-packages - /github/managing-packages-with-github-packages/configuring-docker-for-use-with-github-packages
- /packages/using-github-packages-with-your-projects-ecosystem/configuring-docker-for-use-with-github-packages - /packages/using-github-packages-with-your-projects-ecosystem/configuring-docker-for-use-with-github-packages
- /packages/guides/container-guides-for-github-packages/configuring-docker-for-use-with-github-packages
- /packages/guides/configuring-docker-for-use-with-github-packages
versions: versions:
free-pro-team: '*' free-pro-team: '*'
enterprise-server: '>=2.22' enterprise-server: '>=2.22'
@@ -18,11 +20,11 @@ versions:
{% data reusables.package_registry.admins-can-configure-package-types %} {% data reusables.package_registry.admins-can-configure-package-types %}
### About Docker and {% data variables.product.prodname_registry %} {% data reusables.package_registry.docker-vs-container-registry %}
{% data reusables.package_registry.docker_registry_deprecation_status %} ### About Docker support
When installing or publishing a docker image, {% data variables.product.prodname_registry %} does not currently support foreign layers, such as Windows images. When installing or publishing a Docker image, the Docker registry does not currently support foreign layers, such as Windows images.
{% if currentVersion == "enterprise-server@2.22" %} {% if currentVersion == "enterprise-server@2.22" %}
@@ -75,10 +77,6 @@ To use this example login command, replace `USERNAME` with your {% data variable
For more information, see "[Docker login](https://docs.docker.com/engine/reference/commandline/login/#provide-a-password-using-stdin)." For more information, see "[Docker login](https://docs.docker.com/engine/reference/commandline/login/#provide-a-password-using-stdin)."
#### Authenticating with the `GITHUB_TOKEN`
{% data reusables.package_registry.package-registry-with-github-tokens %}
### Publishing an image ### Publishing an image
{% data reusables.package_registry.docker_registry_deprecation_status %} {% data reusables.package_registry.docker_registry_deprecation_status %}

View File

@@ -1,12 +1,13 @@
--- ---
title: Configuring Gradle for use with GitHub Packages title: Working with the Gradle registry
intro: 'You can configure Gradle to publish packages to {% data variables.product.prodname_registry %} and to use packages stored on {% data variables.product.prodname_registry %} as dependencies in a Java project.' intro: 'You can configure Gradle to publish packages to the {% data variables.product.prodname_registry %} Gradle registry and to use packages stored on {% data variables.product.prodname_registry %} as dependencies in a Java project.'
product: '{% data reusables.gated-features.packages %}' product: '{% data reusables.gated-features.packages %}'
redirect_from: redirect_from:
- /articles/configuring-gradle-for-use-with-github-package-registry - /articles/configuring-gradle-for-use-with-github-package-registry
- /github/managing-packages-with-github-package-registry/configuring-gradle-for-use-with-github-package-registry - /github/managing-packages-with-github-package-registry/configuring-gradle-for-use-with-github-package-registry
- /github/managing-packages-with-github-packages/configuring-gradle-for-use-with-github-packages - /github/managing-packages-with-github-packages/configuring-gradle-for-use-with-github-packages
- /packages/using-github-packages-with-your-projects-ecosystem/configuring-gradle-for-use-with-github-packages - /packages/using-github-packages-with-your-projects-ecosystem/configuring-gradle-for-use-with-github-packages
- /packages/guides/configuring-gradle-for-use-with-github-packages
versions: versions:
free-pro-team: '*' free-pro-team: '*'
enterprise-server: '>=2.22' enterprise-server: '>=2.22'
@@ -20,7 +21,7 @@ versions:
### Authenticating to {% data variables.product.prodname_registry %} ### Authenticating to {% data variables.product.prodname_registry %}
{% data reusables.package_registry.authenticate-packages %} {% data reusables.package_registry.authenticate-packages %} For more information about using `GITHUB_TOKEN` with Gradle, see "[Publishing Java packages with Gradle](/actions/guides/publishing-java-packages-with-gradle#publishing-packages-to-github-packages)."
#### Authenticating with a personal access token #### Authenticating with a personal access token
@@ -48,7 +49,6 @@ Replace *USERNAME* with your {% data variables.product.prodname_dotcom %} userna
plugins { plugins {
id("maven-publish") id("maven-publish")
} }
publishing { publishing {
repositories { repositories {
maven { maven {
@@ -74,7 +74,6 @@ publishing {
plugins { plugins {
id("maven-publish") apply false id("maven-publish") apply false
} }
subprojects { subprojects {
apply plugin: "maven-publish" apply plugin: "maven-publish"
publishing { publishing {
@@ -103,7 +102,6 @@ subprojects {
plugins { plugins {
`maven-publish` `maven-publish`
} }
publishing { publishing {
repositories { repositories {
maven { maven {
@@ -129,7 +127,6 @@ publishing {
plugins { plugins {
`maven-publish` apply false `maven-publish` apply false
} }
subprojects { subprojects {
apply(plugin = "maven-publish") apply(plugin = "maven-publish")
configure<PublishingExtension> { configure<PublishingExtension> {
@@ -152,20 +149,14 @@ subprojects {
} }
``` ```
#### Authenticating with the `GITHUB_TOKEN` ### Publishing a package
{% data reusables.package_registry.package-registry-with-github-tokens %} {% data reusables.package_registry.default-name %} For example, {% data variables.product.prodname_dotcom %} will publish a package named `com.example.test` in the `OWNER/test` {% data variables.product.prodname_registry %} repository.
For more information about using `GITHUB_TOKEN` with Maven, see "[Publishing Java packages with Maven](/actions/language-and-framework-guides/publishing-java-packages-with-maven#publishing-packages-to-github-packages)." {% data reusables.package_registry.viewing-packages %}
### Publishing a package {% data reusables.package_registry.authenticate-step %}
2. After creating your package, you can publish the package.
{% data reusables.package_registry.default-name %} For example, {% data variables.product.prodname_dotcom %} will publish a package named `com.example.test` in the `OWNER/test` {% data variables.product.prodname_registry %} repository.
{% data reusables.package_registry.viewing-packages %}
{% data reusables.package_registry.authenticate-step %}
2. After creating your package, you can publish the package.
```shell ```shell
$ gradle publish $ gradle publish
@@ -214,5 +205,5 @@ You can install a package by adding the package as a dependency to your project.
### Further reading ### Further reading
- "[Configuring Apache Maven for use with {% data variables.product.prodname_registry %}](/packages/using-github-packages-with-your-projects-ecosystem/configuring-apache-maven-for-use-with-github-packages)" - "[Working with the Apache Maven registry](/packages/working-with-a-github-packages-registry/working-with-the-apache-maven-registry)"
- "{% if currentVersion == "free-pro-team@latest" or currentVersion ver_gt "enterprise-server@3.0" %}[Deleting and restoring a package](/packages/learn-github-packages/deleting-and-restoring-a-package){% elsif currentVersion ver_lt "enterprise-server@3.1" or currentVersion == "github-ae@latest" %}[Deleting a package](/packages/learn-github-packages/deleting-a-package){% endif %}" - "{% if currentVersion == "free-pro-team@latest" or currentVersion ver_gt "enterprise-server@3.0" %}[Deleting and restoring a package](/packages/learn-github-packages/deleting-and-restoring-a-package){% elsif currentVersion ver_lt "enterprise-server@3.1" or currentVersion == "github-ae@latest" %}[Deleting a package](/packages/learn-github-packages/deleting-a-package){% endif %}"

View File

@@ -1,5 +1,5 @@
--- ---
title: Configuring npm for use with GitHub Packages title: Working with the npm registry
intro: 'You can configure npm to publish packages to {% data variables.product.prodname_registry %} and to use packages stored on {% data variables.product.prodname_registry %} as dependencies in an npm project.' intro: 'You can configure npm to publish packages to {% data variables.product.prodname_registry %} and to use packages stored on {% data variables.product.prodname_registry %} as dependencies in an npm project.'
product: '{% data reusables.gated-features.packages %}' product: '{% data reusables.gated-features.packages %}'
redirect_from: redirect_from:
@@ -7,6 +7,7 @@ redirect_from:
- /github/managing-packages-with-github-package-registry/configuring-npm-for-use-with-github-package-registry - /github/managing-packages-with-github-package-registry/configuring-npm-for-use-with-github-package-registry
- /github/managing-packages-with-github-packages/configuring-npm-for-use-with-github-packages - /github/managing-packages-with-github-packages/configuring-npm-for-use-with-github-packages
- /packages/using-github-packages-with-your-projects-ecosystem/configuring-npm-for-use-with-github-packages - /packages/using-github-packages-with-your-projects-ecosystem/configuring-npm-for-use-with-github-packages
- /packages/guides/configuring-npm-for-use-with-github-packages
versions: versions:
free-pro-team: '*' free-pro-team: '*'
enterprise-server: '>=2.22' enterprise-server: '>=2.22'
@@ -84,10 +85,6 @@ $ npm login --scope=@<em>OWNER</em> --registry=https://<em>HOSTNAME</em>/_regist
``` ```
{% endif %} {% endif %}
#### Authenticating with the `GITHUB_TOKEN`
{% data reusables.package_registry.package-registry-with-github-tokens %}
### Publishing a package ### Publishing a package
{% note %} {% note %}

View File

@@ -1,5 +1,5 @@
--- ---
title: Configuring `dotnet` CLI for use with GitHub Packages title: Working with the NuGet registry
intro: 'You can configure the `dotnet` command-line interface (CLI) to publish NuGet packages to {% data variables.product.prodname_registry %} and to use packages stored on {% data variables.product.prodname_registry %} as dependencies in a .NET project.' intro: 'You can configure the `dotnet` command-line interface (CLI) to publish NuGet packages to {% data variables.product.prodname_registry %} and to use packages stored on {% data variables.product.prodname_registry %} as dependencies in a .NET project.'
product: '{% data reusables.gated-features.packages %}' product: '{% data reusables.gated-features.packages %}'
redirect_from: redirect_from:
@@ -8,6 +8,7 @@ redirect_from:
- /github/managing-packages-with-github-packages/configuring-nuget-for-use-with-github-packages - /github/managing-packages-with-github-packages/configuring-nuget-for-use-with-github-packages
- /github/managing-packages-with-github-packages/configuring-dotnet-cli-for-use-with-github-packages - /github/managing-packages-with-github-packages/configuring-dotnet-cli-for-use-with-github-packages
- /packages/using-github-packages-with-your-projects-ecosystem/configuring-dotnet-cli-for-use-with-github-packages - /packages/using-github-packages-with-your-projects-ecosystem/configuring-dotnet-cli-for-use-with-github-packages
- /packages/guides/configuring-dotnet-cli-for-use-with-github-packages
versions: versions:
free-pro-team: '*' free-pro-team: '*'
enterprise-server: '>=2.22' enterprise-server: '>=2.22'
@@ -74,10 +75,6 @@ If your instance has subdomain isolation disabled:
``` ```
{% endif %} {% endif %}
#### Authenticating with the `GITHUB_TOKEN`
{% data reusables.package_registry.package-registry-with-github-tokens %}
### Publishing a package ### Publishing a package
You can publish a package to {% data variables.product.prodname_registry %} by authenticating with a *nuget.config* file{% if currentVersion == "free-pro-team@latest" or currentVersion ver_gt "enterprise-server@2.22" or currentVersion == "github-ae@latest"%}, or by using the `--api-key` command line option with your {% data variables.product.prodname_dotcom %} personal access token (PAT){% endif %}. You can publish a package to {% data variables.product.prodname_registry %} by authenticating with a *nuget.config* file{% if currentVersion == "free-pro-team@latest" or currentVersion ver_gt "enterprise-server@2.22" or currentVersion == "github-ae@latest"%}, or by using the `--api-key` command line option with your {% data variables.product.prodname_dotcom %} personal access token (PAT){% endif %}.

View File

@@ -1,5 +1,5 @@
--- ---
title: Configuring RubyGems for use with GitHub Packages title: Working with the RubyGems registry
intro: 'You can configure RubyGems to publish a package to {% data variables.product.prodname_registry %} and to use packages stored on {% data variables.product.prodname_registry %} as dependencies in a Ruby project with Bundler.' intro: 'You can configure RubyGems to publish a package to {% data variables.product.prodname_registry %} and to use packages stored on {% data variables.product.prodname_registry %} as dependencies in a Ruby project with Bundler.'
product: '{% data reusables.gated-features.packages %}' product: '{% data reusables.gated-features.packages %}'
redirect_from: redirect_from:
@@ -7,6 +7,7 @@ redirect_from:
- /github/managing-packages-with-github-package-registry/configuring-rubygems-for-use-with-github-package-registry - /github/managing-packages-with-github-package-registry/configuring-rubygems-for-use-with-github-package-registry
- /github/managing-packages-with-github-packages/configuring-rubygems-for-use-with-github-packages - /github/managing-packages-with-github-packages/configuring-rubygems-for-use-with-github-packages
- /packages/using-github-packages-with-your-projects-ecosystem/configuring-rubygems-for-use-with-github-packages - /packages/using-github-packages-with-your-projects-ecosystem/configuring-rubygems-for-use-with-github-packages
- /packages/guides/configuring-rubygems-for-use-with-github-packages
versions: versions:
free-pro-team: '*' free-pro-team: '*'
enterprise-server: '>=2.22' enterprise-server: '>=2.22'
@@ -85,10 +86,6 @@ To authenticate with Bundler, configure Bundler to use your personal access toke
$ bundle config https://{% if currentVersion == "free-pro-team@latest" %}rubygems.pkg.github.com{% else %}REGISTRY-URL{% endif %}/<em>OWNER USERNAME:TOKEN</em> $ bundle config https://{% if currentVersion == "free-pro-team@latest" %}rubygems.pkg.github.com{% else %}REGISTRY-URL{% endif %}/<em>OWNER USERNAME:TOKEN</em>
``` ```
#### Authenticating with the `GITHUB_TOKEN`
{% data reusables.package_registry.package-registry-with-github-tokens %}
### Publishing a package ### Publishing a package
{% data reusables.package_registry.default-name %} For example, when you publish `octo-gem` to the `octo-org` organization, {% data variables.product.prodname_registry %} publishes the gem to the `octo-org/octo-gem` repository. For more information on creating your gem, see "[Make your own gem](http://guides.rubygems.org/make-your-own-gem/)" in the RubyGems documentation. {% data reusables.package_registry.default-name %} For example, when you publish `octo-gem` to the `octo-org` organization, {% data variables.product.prodname_registry %} publishes the gem to the `octo-org/octo-gem` repository. For more information on creating your gem, see "[Make your own gem](http://guides.rubygems.org/make-your-own-gem/)" in the RubyGems documentation.

View File

@@ -1,4 +1,4 @@
{% data variables.product.prodname_registry %} is available with {% data variables.product.prodname_free_user %}, {% data variables.product.prodname_pro %}, {% data variables.product.prodname_free_team %} for organizations, {% data variables.product.prodname_team %}, {% data variables.product.prodname_ghe_cloud %}, {% data variables.product.prodname_ghe_server %} 2.22, and {% data variables.product.prodname_ghe_managed %}. {% data variables.product.prodname_registry %} is available with {% data variables.product.prodname_free_user %}, {% data variables.product.prodname_pro %}, {% data variables.product.prodname_free_team %} for organizations, {% data variables.product.prodname_team %}, {% data variables.product.prodname_ghe_cloud %}, {% data variables.product.prodname_ghe_server %}, and {% data variables.product.prodname_ghe_managed %}.
{% if currentVersion == "free-pro-team@latest" %} {% if currentVersion == "free-pro-team@latest" %}
<br>{% data variables.product.prodname_registry %} is not available for private repositories owned by accounts using legacy per-repository plans. Also, accounts using legacy per-repository plans cannot access {% data variables.product.prodname_github_container_registry %} since these accounts are billed by repository. {% data reusables.gated-features.more-info %} <br>{% data variables.product.prodname_registry %} is not available for private repositories owned by accounts using legacy per-repository plans. Also, accounts using legacy per-repository plans cannot access the {% data variables.product.prodname_capitalized_container_registry %} since these accounts are billed by repository. {% data reusables.gated-features.more-info %}
{% endif %} {% endif %}

View File

@@ -0,0 +1,31 @@
### Packaging in continuous integration workflows
A packaging step is a common part of a continuous integration or continuous delivery workflow. Creating a package at the end of a continuous integration workflow can help during code reviews on a pull request.
After building and testing your code, a packaging step can produce a runnable or deployable artifact. Depending on the kind of application you're building, this package can be downloaded locally for manual testing, made available for users to download, or deployed to a staging or production environment.
For example, a continuous integration workflow for a Java project may run `mvn package` to produce a JAR file. Or, a CI workflow for a Node.js application may create a Docker container.
Now, when reviewing a pull request, you'll be able to look at the workflow run and download the artifact that was produced.
{% if currentVersion == "free-pro-team@latest" or currentVersion ver_gt "enterprise-server@3.0" or currentVersion == "github-ae@latest" %}
![Download artifact drop-down menu](/assets/images/help/repository/artifact-drop-down-updated.png)
{% else %}
![Download artifact drop-down menu](/assets/images/help/repository/artifact-drop-down.png)
{% endif %}
This will let you run the code in the pull request on your machine, which can help with debugging or testing the pull request.
### Workflows for publishing packages
In addition to uploading packaging artifacts for testing in a continuous integration workflow, you can create workflows that build your project and publish packages to a package registry.
* **Publish packages to {% data variables.product.prodname_registry %}**
{% data variables.product.prodname_registry %} can act as a package hosting service for many types of packages. You can choose to share your packages with all of {% data variables.product.prodname_dotcom %}, or private packages to share with collaborators or an organization. For more information, see "[Introduction to GitHub Packages](/packages/learn-github-packages/introduction-to-github-packages)."
You may want to publish packages to {% data variables.product.prodname_registry %} on every push into the default branch. This will allow developers on your project to always be able to run and test the latest build from the default branch easily, by installing it from {% data variables.product.prodname_registry %}.
* **Publish packages to a package registry**
For many projects, publishing to a package registry is performed whenever a new version of a project is released. For example, a project that produces a JAR file may upload new releases to the Maven Central repository. Or, a .NET project may produce a nuget package and upload it to the NuGet Gallery.
You can automate this by creating a workflow that publishes packages to a package registry on every release creation. For more information, see "[Creating releases](/github/administering-a-repository/creating-releases)."

View File

@@ -1,12 +1,9 @@
You need an access token to publish, install, and delete packages. You can use a personal access token to authenticate with your username directly to {% data variables.product.prodname_registry %} or the {% data variables.product.prodname_dotcom %} API. When you create a personal access token, you can assign the token different scopes depending on your needs. You need an access token to publish, install, and delete packages.
{% if currentVersion == "free-pro-team@latest" %} You can use a personal access token (PAT) to authenticate to {% data variables.product.prodname_registry %} or the {% data variables.product.prodname_dotcom %} API. When you create a personal access token, you can assign the token different scopes depending on your needs. For more information about packages-related scopes for a PAT, see "[About permissions for GitHub Packages](/packages/learn-github-packages/about-permissions-for-github-packages#about-scopes-and-permissions-for-package-registries)."
To authenticate using a {% data variables.product.prodname_actions %} workflow:
- For package registries (`PACKAGE-REGISTRY.pkg.github.com`), you can use a `GITHUB_TOKEN`.
- For the container registry (`ghcr.io/OWNER/IMAGE-NAME`), you can use a `GITHUB_TOKEN` or a personal access token. We strongly recommend you use a `GITHUB_TOKEN` to avoid unncessary access to your repositories.
For more information about `GITHUB_TOKEN` used in {% data variables.product.prodname_actions %} workflows, see "[Encrypted secrets](/actions/reference/encrypted-secrets)" and "[Authentication in a workflow](/actions/reference/authentication-in-a-workflow#using-the-github_token-in-a-workflow)." To authenticate to a {% data variables.product.prodname_registry %} registry within a {% data variables.product.prodname_actions %} workflow, you can use:
- `GITHUB_TOKEN` to publish packages associated with the workflow repository.
- a PAT to install packages associated with other private repositories (which `GITHUB_TOKEN` can't access).
{% else %} For more information about `GITHUB_TOKEN` used in {% data variables.product.prodname_actions %} workflows, see "[Authentication in a workflow](/actions/reference/authentication-in-a-workflow#using-the-github_token-in-a-workflow)."
To authenticate to {% data variables.product.prodname_registry %} using a {% data variables.product.prodname_actions %} workflow, you must use `GITHUB_TOKEN`.
{% endif %}

View File

@@ -15,7 +15,7 @@
```shell ```shell
$ export CR_PAT=YOUR_TOKEN $ export CR_PAT=YOUR_TOKEN
``` ```
3. Using the CLI for your container type, sign in to the {% data variables.product.prodname_github_container_registry %} service at `ghcr.io`. 3. Using the CLI for your container type, sign in to the {% data variables.product.prodname_capitalized_container_registry %} service at `ghcr.io`.
{% raw %} {% raw %}
```shell ```shell
$ echo $CR_PAT | docker login ghcr.io -u USERNAME --password-stdin $ echo $CR_PAT | docker login ghcr.io -u USERNAME --password-stdin

View File

@@ -2,9 +2,9 @@
PATs can grant broad access to your account. You should select only the necessary `read:packages`, `write:packages`, or `delete:packages` scope when creating a PAT to authenticate to the {% data variables.product.prodname_container_registry %}. PATs can grant broad access to your account. You should select only the necessary `read:packages`, `write:packages`, or `delete:packages` scope when creating a PAT to authenticate to the {% data variables.product.prodname_container_registry %}.
To authenticate to {% data variables.product.prodname_github_container_registry %} within a {% data variables.product.prodname_actions %} workflow, use the `GITHUB_TOKEN` for the best security and experience. To authenticate to the {% data variables.product.prodname_capitalized_container_registry %} within a {% data variables.product.prodname_actions %} workflow, use the `GITHUB_TOKEN` for the best security and experience.
For guidance on updating your workflows that authenticate to `ghcr.io` with a personal access token, see "[Upgrading a workflow that accesses `ghcr.io`](/packages/guides/using-github-packages-with-github-actions#upgrading-a-workflow-that-accesses-ghcrio)." For guidance on updating your workflows that authenticate to `ghcr.io` with a personal access token, see "[Upgrading a workflow that accesses `ghcr.io`](/packages/managing-github-packages-using-github-actions-workflows/publishing-and-installing-a-package-with-github-actions#upgrading-a-workflow-that-accesses-ghcrio)."
{% data reusables.package_registry.github-token-security-over-pat %} {% data reusables.package_registry.github-token-security-over-pat %}

View File

@@ -1,3 +0,0 @@
During the {% data variables.product.prodname_github_container_registry %} beta, both the new {% data variables.product.prodname_container_registry %} and existing {% data variables.product.prodname_registry %} Docker registry will be free. For more information about the {% data variables.product.prodname_registry %} Docker registry, see "[Configuring Docker for use with {% data variables.product.prodname_registry %}](/packages/guides/configuring-docker-for-use-with-github-packages)."
After the beta, the same billing and storage rates that other {% data variables.product.prodname_registry %} registries use will apply to the container registry. For more information, see "[About billing for {% data variables.product.prodname_registry %}](/github/setting-up-and-managing-billing-and-payments-on-github/about-billing-for-github-packages)."

View File

@@ -1,5 +0,0 @@
{% note %}
**Billing update for container image storage:** During the beta phase of {% data variables.product.prodname_github_container_registry %}, Docker image storage and bandwidth are free for the old `docker.pkg.github.com` and new `ghcr.io` hosting services. For more information, see "[About {% data variables.product.prodname_github_container_registry %}](/packages/guides/about-github-container-registry)."
{% endnote %}

View File

@@ -1,5 +1,5 @@
{% note %} {% note %}
**Note:** {% data variables.product.prodname_github_container_registry %} is currently in public beta and subject to change. During the beta, storage and bandwidth are free. To use {% data variables.product.prodname_github_container_registry %}, you must enable the feature preview. For more information, see "[About {% data variables.product.prodname_github_container_registry %}](/packages/guides/about-github-container-registry)" and "[Enabling improved container support](/packages/guides/enabling-improved-container-support)." **Note:** The {% data variables.product.prodname_capitalized_container_registry %} is currently in public beta and subject to change. During the beta, storage and bandwidth are free. To use the {% data variables.product.prodname_capitalized_container_registry %}, you must enable the feature preview. For more information, see "[Introduction to {% data variables.product.prodname_registry %}](/packages/learn-github-packages/introduction-to-github-packages)" and "[Enabling improved container support with the {% data variables.product.prodname_container_registry %}](/packages/working-with-a-github-packages-registry/enabling-improved-container-support-with-the-container-registry)."
{% endnote %} {% endnote %}

View File

@@ -1,4 +0,0 @@
With the container registry you can:
- Store container images within your organization and user account, rather than a repository.
- Set fine-grained permissions and visibility independent of repository permissions and visibility.
- Access public container images anonymously.

View File

@@ -0,0 +1,9 @@
{% if currentVersion == "free-pro-team@latest" %}
{% note %}
**Comparing the Docker registry and the {% data variables.product.prodname_capitalized_container_registry %}:**
- The {% data variables.product.prodname_container_registry %} (`https://ghcr.io`) offers improved performance for containers and will supercede the Docker registry in the future.
- You can migrate your Docker images and workflows from the Docker registry (`docker.pkg.github.com`) to the {% data variables.product.prodname_capitalized_container_registry %} (`https://ghcr.io`) for granular permissions, container storage optimization, and more. For more information, see "[Migrating to the {% data variables.product.prodname_container_registry %} from the Docker registry](/packages/working-with-a-github-packages-registry/migrating-to-the-container-registry-from-the-docker-registry)."
{% endnote %}
{% endif %}

View File

@@ -1,5 +1,5 @@
{% warning %} {% warning %}
**Note:** The {% data variables.product.prodname_registry %} Docker registry {% if enterpriseServerVersions contains currentVersion or currentVersion == "github-ae@latest" %} will offer improved container support in a future {% data variables.product.product_name %} release.{% elsif currentVersion == "free-pro-team@latest" %} now offers improved container support. For more information, see "[About GitHub Container Registry](/packages/guides/about-github-container-registry)." To learn how to migrate your existing Docker images and any workflows using them, see "[Migrating to {% data variables.product.prodname_github_container_registry %} for Docker images](/packages/guides/migrating-to-github-container-registry-for-docker-images)" and "[Container guides for {% data variables.product.prodname_registry %}](/packages/guides/container-guides-for-github-packages)."{% endif %} **Note:** The {% data variables.product.prodname_registry %} Docker registry {% if enterpriseServerVersions contains currentVersion or currentVersion == "github-ae@latest" %} will be superseded in a future {% data variables.product.product_name %} release with the {% data variables.product.prodname_capitalized_container_registry %}, which offers improved container support.{% elsif currentVersion == "free-pro-team@latest" %} is superseded by the {% data variables.product.prodname_capitalized_container_registry %}, which offers improved container support. {% endif %} {% if currentVersion == "free-pro-team@latest" %} To learn how to migrate your existing Docker images and any workflows using them, see "[Migrating to the {% data variables.product.prodname_capitalized_container_registry %} from the Docker registry](/packages/working-with-a-github-packages-registry/migrating-to-the-container-registry-from-the-docker-registry)." {% endif %}
{% endwarning %} {% endwarning %}

View File

@@ -1,5 +1,5 @@
{% note %} {% note %}
**Note:** Before you can use {% data variables.product.prodname_github_container_registry %}, you must enable the feature for your account. For more information, see "[Enabling improved container support](/packages/guides/enabling-improved-container-support)." **Note:** Before you can use {% data variables.product.prodname_capitalized_container_registry %}, you must enable the feature for your account. For more information, see "[Enabling improved container support with the {% data variables.product.prodname_container_registry %}](/packages/working-with-a-github-packages-registry/enabling-improved-container-support-with-the-container-registry)."
{% endnote %} {% endnote %}

View File

@@ -1,3 +1,3 @@
{% data variables.product.prodname_github_container_registry %} now supports `GITHUB_TOKEN` for easy and secure authentication in your workflows. If your workflow is using a personal access token (PAT) to authenticate to `ghcr.io`, then we highly recommend you update your workflow to use `GITHUB_TOKEN`. {% data variables.product.prodname_capitalized_container_registry %} now supports `GITHUB_TOKEN` for easy and secure authentication in your workflows. If your workflow is using a personal access token (PAT) to authenticate to `ghcr.io`, then we highly recommend you update your workflow to use `GITHUB_TOKEN`.
For more information about `GITHUB_TOKEN`, see "[Encrypted secrets](/actions/reference/encrypted-secrets)" and "[Authentication in a workflow](/actions/reference/authentication-in-a-workflow#using-the-github_token-in-a-workflow)." For more information about `GITHUB_TOKEN`, see "[Authentication in a workflow](/actions/reference/authentication-in-a-workflow#using-the-github_token-in-a-workflow)."

View File

@@ -0,0 +1,12 @@
Repository-scoped packages inherit their permissions and visibility from the repository that owns the package. The registries below use this type of permissions:
- Docker registry (`docker.pkg.github.com`)
- npm registry
- RubyGems registry
- Apache Maven registry
- NuGet registry
{% if currentVersion == "free-pro-team@latest" %}
The Container registry (`ghcr.io`) offers granular permissions and visibility settings that can be customized for each package owned by a personal user or organization account.
{% endif %}
For more information, see "[About permissions for GitHub Packages](/packages/learn-github-packages/about-permissions-for-github-packages)"{% if currentVersion == "free-pro-team@latest" %} or "[Configuring a package's access control and visibility](/packages/learn-github-packages/configuring-a-packages-access-control-and-visibility)."{% endif %}.

View File

@@ -0,0 +1,13 @@
{% if currentVersion == "free-pro-team@latest" %}
If you have admin permissions to a container image, you can set the access permissions for the container image to private or public. Public images allow anonymous access and can be pulled without authentication or signing in via the CLI.
As an admin, you can also grant access permissions for a container image that are separate from the permissions you've set at the organization and repository levels.
For container images published and owned by a user account, you can give any person an access role. For container images published and owned by an organization, you can give any person or team in the organization an access role.
| Permission | Access description |
|------------|--------------------|
| read | Can download package. <br> Can read package metadata. |
| write | Can upload and download this package. <br> Can read and write package metadata. |
| admin | Can upload, download, delete, and manage this package. <br> Can read and write package metadata. <br> Can grant package permissions.
{% endif %}

View File

@@ -100,7 +100,7 @@ prodname_discussions: 'GitHub Discussions'
# GitHub Packages # GitHub Packages
prodname_registry: 'GitHub Packages' prodname_registry: 'GitHub Packages'
prodname_github_container_registry: 'GitHub Container Registry' prodname_capitalized_container_registry: 'Container registry'
prodname_container_registry: 'container registry' prodname_container_registry: 'container registry'
# GitHub Insights # GitHub Insights

View File

@@ -42,14 +42,22 @@ describe('featuredLinks', () => {
expect($featuredLinks.eq(0).children('p').text().startsWith('GitHub Insights provides metrics')).toBe(true) expect($featuredLinks.eq(0).children('p').text().startsWith('GitHub Insights provides metrics')).toBe(true)
}) })
// If any of these tests fail, check to see if the content has changed and update text if needed.
test('featured links respect versioning', async () => { test('featured links respect versioning', async () => {
const $ = await getDOM(`/en/enterprise/${enterpriseServerReleases.latest}/user/packages`) const enterpriseVersionedLandingPage = `/en/enterprise-server@${enterpriseServerReleases.latest}/packages`
const $ = await getDOM(enterpriseVersionedLandingPage)
const $featuredLinks = $('.all-articles-list a') const $featuredLinks = $('.all-articles-list a')
expect($featuredLinks.length).toBeGreaterThan(2) let msg = `Featured links are not rendered as expected on ${enterpriseVersionedLandingPage}`
expect($featuredLinks.text().includes('Package client guides for GitHub Packages')).toBe(true) expect($featuredLinks.length, msg).toBeGreaterThan(2)
// does not include dotcom-only links
expect($featuredLinks.text().includes('About GitHub Container Registry')).toBe(false) // Confirm that the following Enterprise link IS included on this Enterprise page.
expect($featuredLinks.text().includes('Getting started with GitHub Container Registry')).toBe(false) msg = `Enterprise featured link is not rendered as expected on ${enterpriseVersionedLandingPage}`
expect($featuredLinks.text().includes('Working with a GitHub Packages registry'), msg).toBe(true)
// Confirm that the following Dotcom-only links are NOT included on this Enterprise page.
msg = `Dotcom-only featured link is rendered, but should not be, on ${enterpriseVersionedLandingPage}`
expect($featuredLinks.text().includes('Enabling improved container support with the Container registry')).toBe(false)
expect($featuredLinks.text().includes('Migrating to the Container registry from the Docker registry'), msg).toBe(false)
}) })
}) })