[Improvement]: Improve terminology in Packages docs (#34227)
Co-authored-by: github-actions <github-actions@github.com> Co-authored-by: Jess Hosman <1183847+jhosman@users.noreply.github.com>
This commit is contained in:
@@ -26,7 +26,7 @@ You can extend the CI and CD capabilities of your repository by publishing or in
|
||||
{% ifversion packages-registries-v2 %}
|
||||
### Authenticating to package registries with granular permissions
|
||||
|
||||
Some {% data variables.product.prodname_registry %} registries support granular permissions. This means you can choose to allow packages to be owned by a user or an organization, or linked to a repository. For the list of registries that support granular permissions, see "[About permissions for {% data variables.product.prodname_registry %}](/packages/learn-github-packages/about-permissions-for-github-packages#granular-permissions-for-userorganization-scoped-packages)."
|
||||
Some {% data variables.product.prodname_registry %} registries support granular permissions. This means you can choose to allow packages to be scoped to a user or an organization, or linked to a repository. For the list of registries that support granular permissions, see "[About permissions for {% data variables.product.prodname_registry %}](/packages/learn-github-packages/about-permissions-for-github-packages#granular-permissions-for-userorganization-scoped-packages)."
|
||||
|
||||
{% data reusables.package_registry.authenticate_with_pat_for_v2_registry %}
|
||||
|
||||
@@ -46,7 +46,7 @@ You can reference the `GITHUB_TOKEN` in your workflow file using the {% raw %}`{
|
||||
|
||||
### Packages scoped to users or organizations
|
||||
|
||||
Registries that support granular permissions allow users to create and administer packages as free-standing resources at the organization level. Packages can be owned by an organization or personal account and you can customize access to each of your packages separately from repository permissions.
|
||||
Registries that support granular permissions allow users to create and administer packages as free-standing resources at the organization level. Packages can be scoped to an organization or personal account and you can customize access to each of your packages separately from repository permissions.
|
||||
|
||||
All workflows accessing registries that support granular permissions should use the `GITHUB_TOKEN` instead of a {% data variables.product.pat_generic %}. For more information about security best practices, see "[Security hardening for GitHub Actions](/actions/learn-github-actions/security-hardening-for-github-actions#using-secrets)."
|
||||
|
||||
@@ -60,23 +60,23 @@ When you enable GitHub Actions, GitHub installs a GitHub App on your repository.
|
||||
|
||||
{% ifversion packages-registries-v2 %}
|
||||
|
||||
## Default permissions and access settings for containers modified through workflows
|
||||
## Default permissions and access settings for packages modified through workflows
|
||||
|
||||
When you create, install, modify, or delete a container through a workflow, there are some default permission and access settings used to ensure admins have access to the workflow. You can adjust these access settings as well.
|
||||
For packages in registries that support granular permissions, when you create, install, modify, or delete a package through a workflow, there are some default permission and access settings used to ensure admins have access to the workflow. You can adjust these access settings as well. For the list of registries that support granular permissions, see "[About permissions for {% data variables.product.prodname_registry %}](/packages/learn-github-packages/about-permissions-for-github-packages#granular-permissions-for-userorganization-scoped-packages)."
|
||||
|
||||
For example, by default if a workflow creates a container using the `GITHUB_TOKEN`, then:
|
||||
- The container inherits the visibility and permissions model of the repository where the workflow is run.
|
||||
- Repository admins where the workflow is run become the admins of the container once the container is created.
|
||||
For example, by default if a workflow creates a package using the `GITHUB_TOKEN`, then:
|
||||
- The package inherits the visibility and permissions model of the repository where the workflow is run.
|
||||
- Repository admins where the workflow is run become the admins of the package once the package is created.
|
||||
|
||||
These are more examples of how default permissions work for workflows that manage packages.
|
||||
|
||||
| {% data variables.product.prodname_actions %} workflow task | Default permissions and access |
|
||||
|----|----|
|
||||
| Download an existing container | - If the container is public, any workflow running in any repository can download the container. <br> - If the container is internal, then all workflows running in any repository owned by the Enterprise account can download the container. For enterprise-owned organizations, you can read any repository in the enterprise <br> - If the container is private, only workflows running in repositories that are given read permission on that container can download the container. <br>
|
||||
| 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 admin permission can delete existing versions of the container.
|
||||
| Download an existing | - If the package is public, any workflow running in any repository can download the package. <br> - If the package is internal, then all workflows running in any repository owned by the Enterprise account can download the package. For enterprise-owned organizations, you can read any repository in the enterprise <br> - If the package is private, only workflows running in repositories that are given read permission on that package can download the package. <br>
|
||||
| Upload a new version to an existing package | - If the package is private, internal, or public, only workflows running in repositories that are given write permission on that package can upload new versions to the package.
|
||||
| Delete a package or versions of a package | - If the package is private, internal, or public, only workflows running in repositories that are given admin permission can delete existing versions of the package.
|
||||
|
||||
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 package’s access control and visibility](/packages/learn-github-packages/configuring-a-packages-access-control-and-visibility)."
|
||||
You can also adjust access to packages in a more granular way or adjust some of the default permissions behavior. For more information, see "[Configuring a package’s access control and visibility](/packages/learn-github-packages/configuring-a-packages-access-control-and-visibility)."
|
||||
|
||||
{% endif %}
|
||||
|
||||
@@ -326,7 +326,7 @@ permissions:
|
||||
{% endraw %}
|
||||
</td>
|
||||
<td>
|
||||
Creates a step called <code>Log in to the {% data variables.product.prodname_container_registry %}</code>, which logs in to the registry using the account and password that will publish the packages. Once published, the packages are owned by the account defined here.
|
||||
Creates a step called <code>Log in to the {% data variables.product.prodname_container_registry %}</code>, which logs in to the registry using the account and password that will publish the packages. Once published, the packages are scoped to the account defined here.
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@@ -362,7 +362,7 @@ permissions:
|
||||
{% endraw %}
|
||||
</td>
|
||||
<td>
|
||||
Creates a new step called <code>Log in to GitHub Docker Registry</code>, which logs in to the registry using the account and password that will publish the packages. Once published, the packages are owned by the account defined here.
|
||||
Creates a new step called <code>Log in to GitHub Docker Registry</code>, which logs in to the registry using the account and password that will publish the packages. Once published, the packages are scoped to the account defined here.
|
||||
</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
@@ -500,14 +500,14 @@ Using the `GITHUB_TOKEN`, instead of a {% data variables.product.pat_v1 %} with
|
||||
1. Navigate to your package landing page.
|
||||
1. In the left sidebar, click **Actions access**.
|
||||

|
||||
1. To ensure your container package has access to your workflow, you must add the repository where the workflow is stored to your container. Click **Add repository** and search for the repository you want to add.
|
||||
1. To ensure your package has access to your workflow, you must add the repository where the workflow is stored to your package. Click **Add repository** and search for the repository you want to add.
|
||||

|
||||
{% 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/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)."
|
||||
**Note:** Adding a repository to your package through the **Actions access** menu option is different than connecting your package 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 %}
|
||||
1. Optionally, using the "role" drop-down menu, select the default access level that you'd like the repository to have to your container image.
|
||||
1. Optionally, using the "role" drop-down menu, select the default access level that you'd like the repository to have to your package.
|
||||
{% ifversion packages-delete-with-github-token-api %}{% else %}{% endif %}
|
||||
1. Open your workflow file. On the line where you log in to the registry, replace your {% data variables.product.pat_generic %} with {% raw %}`${{ secrets.GITHUB_TOKEN }}`{% endraw %}.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user