Skip to content

AutoCorrect fix for translations/zh-CN/data/reusables/p* #20818

New issue

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

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

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ ms.locfileid: "145100412"
---
### 持续集成工作流程中的打包

打包步骤是持续集成或持续交付工作流程的常见部分。 在持续集成工作流程结束时创建包有助于拉取请求的代码审查。
打包步骤是持续集成或持续交付工作流程的常见部分。在持续集成工作流程结束时创建包有助于拉取请求的代码审查。

构建并测试代码后,打包步骤可以生成可运行或可部署的构件。 根据您构建的应用程序类型,此包可本地下载以进行手动测试、可供用户下载或部署到暂存或生产环境。
构建并测试代码后,打包步骤可以生成可运行或可部署的构件。根据您构建的应用程序类型,此包可本地下载以进行手动测试、可供用户下载或部署到暂存或生产环境。

例如,Java 项目的连续集成工作流可能运行 `mvn package` 来生成 JAR 文件。 或者,Node.js 应用程序的 CI 工作流程可能会创建 Docker 容器。
例如,Java 项目的连续集成工作流可能运行 `mvn package` 来生成 JAR 文件。或者,Node.js 应用程序的 CI 工作流程可能会创建 Docker 容器。

现在,在审查拉取请求时,您将能够查看工作流程运行并下载生成的构件。

Expand All @@ -22,14 +22,14 @@ ms.locfileid: "145100412"

### 发布包的工作流程

除了上传打包构件以测试持续集成工作流程之外, 您还可以创建工作流程来构建项目并发布包到软件包注册表。
除了上传打包构件以测试持续集成工作流程之外,您还可以创建工作流程来构建项目并发布包到软件包注册表。

* 发布包到 {% data variables.product.prodname_registry %}
{% data variables.product.prodname_registry %} 可以作为多种类型包的包托管服务。 您可以选择与所有 {% data variables.product.prodname_dotcom %} 共享您的软件包,或者与合作者或组织共享私有软件包。 有关详细信息,请参阅“[GitHub 包简介](/packages/learn-github-packages/introduction-to-github-packages)”。
{% data variables.product.prodname_registry %} 可以作为多种类型包的包托管服务。您可以选择与所有 {% data variables.product.prodname_dotcom %} 共享您的软件包,或者与合作者或组织共享私有软件包。有关详细信息,请参阅“[GitHub 包简介](/packages/learn-github-packages/introduction-to-github-packages)”。

每次推送到默认分支,您可能想将软件包发布到 {% data variables.product.prodname_registry %}。 这可让项目开发者始终能够通过从 {% data variables.product.prodname_registry %} 安装,很容易地运行和测试默认分支中的最新构建版本。
每次推送到默认分支,您可能想将软件包发布到 {% data variables.product.prodname_registry %}。这可让项目开发者始终能够通过从 {% data variables.product.prodname_registry %} 安装,很容易地运行和测试默认分支中的最新构建版本。

* 将包发布到包注册表
对于许多项目,每当发布项目的新版本时,都会执行发布到包注册表。 例如,生成 JAR 文件的项目可能会将新版本上传到 Maven Central 仓库。 或者,.NET 项目可能会生成一个微件包并上传到 Nuget Gallery。
对于许多项目,每当发布项目的新版本时,都会执行发布到包注册表。例如,生成 JAR 文件的项目可能会将新版本上传到 Maven Central 仓库。或者,.NET 项目可能会生成一个微件包并上传到 Nuget Gallery。

您可以创建一个工作流程来自动执行此操作,在每次创建版本时将软件包发布到软件包注册表。 有关详细信息,请参阅“[创建版本](/github/administering-a-repository/creating-releases)”。
您可以创建一个工作流程来自动执行此操作,在每次创建版本时将软件包发布到软件包注册表。有关详细信息,请参阅“[创建版本](/github/administering-a-repository/creating-releases)”。
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ ms.contentlocale: zh-CN
ms.lasthandoff: 09/11/2022
ms.locfileid: "145100410"
---
配置步骤因包客户端而异。 有关为 {% data variables.product.prodname_actions %} 配置工作流的一般信息,请参阅“[配置工作流](/github/automating-your-workflow-with-github-actions/configuring-a-workflow)”。
配置步骤因包客户端而异。有关为 {% data variables.product.prodname_actions %} 配置工作流的一般信息,请参阅“[配置工作流](/github/automating-your-workflow-with-github-actions/configuring-a-workflow)”。
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ ms.contentlocale: zh-CN
ms.lasthandoff: 09/10/2022
ms.locfileid: "145100409"
---
3. 将 .npmrc 文件添加到 {% data variables.product.prodname_registry %} 可在其中找到项目的存储库。 有关详细信息,请参阅“[将文件添加到存储库](/repositories/working-with-files/managing-files/adding-a-file-to-a-repository)”。
3. 将 .npmrc 文件添加到 {% data variables.product.prodname_registry %} 可在其中找到项目的存储库。有关详细信息,请参阅“[将文件添加到存储库](/repositories/working-with-files/managing-files/adding-a-file-to-a-repository)”。
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ ms.locfileid: "145100407"
---
{% ifversion ghes %} {% note %}

注意:这种包类型可能不适用于你的实例,因为站点管理员可以启用或禁用每种支持的包类型。 有关详细信息,请参阅“[为企业配置包支持](/enterprise/admin/packages/configuring-packages-support-for-your-enterprise)”。
注意:这种包类型可能不适用于你的实例,因为站点管理员可以启用或禁用每种支持的包类型。有关详细信息,请参阅“[为企业配置包支持](/enterprise/admin/packages/configuring-packages-support-for-your-enterprise)”。

{% endnote %} {% endif %}
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ ms.contentlocale: zh-CN
ms.lasthandoff: 09/10/2022
ms.locfileid: "145100408"
---
{% data variables.product.prodname_registry %} 支持 Apache Maven 的 `SNAPSHOT` 版本。 要使用 {% data variables.product.prodname_registry %} 存储库下载 `SNAPSHOT` 工件,请在所用项目的 POM 或 ~/.m2/settings.xml 文件中启用 SNAPSHOTS。
{% data variables.product.prodname_registry %} 支持 Apache Maven 的 `SNAPSHOT` 版本。要使用 {% data variables.product.prodname_registry %} 存储库下载 `SNAPSHOT` 工件,请在所用项目的 POM 或 ~/.m2/settings.xml 文件中启用 SNAPSHOTS。
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ ms.locfileid: "145100405"
---
需要访问令牌才能发布、安装和删除包。

可使用个人访问令牌 (PAT) 向 {% data variables.product.prodname_registry %} 或 {% ifversion fpt or ghec %}{% data variables.product.prodname_dotcom %}{% else %}{% data variables.product.product_name %}{% endif %} API 进行身份验证。 创建个人访问令牌时,可根据需要为令牌分配不同的作用域。 有关 PAT 的包相关范围的详细信息,请参阅“[关于 GitHub Packages 的权限](/packages/learn-github-packages/about-permissions-for-github-packages#about-scopes-and-permissions-for-package-registries)”。
可使用个人访问令牌 (PAT) 向 {% data variables.product.prodname_registry %} 或 {% ifversion fpt or ghec %}{% data variables.product.prodname_dotcom %}{% else %}{% data variables.product.product_name %}{% endif %} API 进行身份验证。创建个人访问令牌时,可根据需要为令牌分配不同的作用域。有关 PAT 的包相关范围的详细信息,请参阅“[关于 GitHub Packages 的权限](/packages/learn-github-packages/about-permissions-for-github-packages#about-scopes-and-permissions-for-package-registries)”。

要在 {% data variables.product.prodname_actions %} 工作流程内向 {% data variables.product.prodname_registry %} 注册表验证,您可以使用:
- `GITHUB_TOKEN` 发布与工作流存储库相关联的包。
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ ms.contentlocale: zh-CN
ms.lasthandoff: 09/11/2022
ms.locfileid: "145100396"
---
1. 向 {% data variables.product.prodname_registry %} 验证。 有关详细信息,请参阅“[向 {% data variables.product.prodname_registry %}](#authenticating-to-github-packages) 进行身份验证”。
1. 向 {% data variables.product.prodname_registry %} 验证。有关详细信息,请参阅“[向 {% data variables.product.prodname_registry %}](#authenticating-to-github-packages) 进行身份验证”。
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ ms.contentlocale: zh-CN
ms.lasthandoff: 09/05/2022
ms.locfileid: "145100394"
---
1. 针对要完成的任务,新创具有适当作用域的个人访问令牌 (PAT)。 如果您的组织需要 SSO,则必须为新令牌启用 SSO。
1. 针对要完成的任务,新创具有适当作用域的个人访问令牌 (PAT)。如果您的组织需要 SSO,则必须为新令牌启用 SSO。
{% warning %}

注意:默认情况下,在用户界面中为个人访问令牌 (PAT) 选择 `write:packages` 范围时,`repo` 范围也将被选中。 `repo` 范围提供了不必要和广泛的访问权限,我们建议你尤其避免使用 GitHub Actions 工作流。 有关详细信息,请参阅“[GitHub Actions 的安全强化](/actions/getting-started-with-github-actions/security-hardening-for-github-actions#considering-cross-repository-access)”。 解决方法是在以下 URL 的用户界面中为 PAT 选择 `write:packages` 范围:`https://{% ifversion fpt or ghec %}github.com{% else %}HOSTNAME{% endif %}/settings/tokens/new?scopes=write:packages`。
注意:默认情况下,在用户界面中为个人访问令牌 (PAT) 选择 `write:packages` 范围时,`repo` 范围也将被选中。 `repo` 范围提供了不必要和广泛的访问权限,我们建议你尤其避免使用 GitHub Actions 工作流。有关详细信息,请参阅“[GitHub Actions 的安全强化](/actions/getting-started-with-github-actions/security-hardening-for-github-actions#considering-cross-repository-access)”。解决方法是在以下 URL 的用户界面中为 PAT 选择 `write:packages` 范围:`https://{% ifversion fpt or ghec %}github.com{% else %}HOSTNAME{% endif %}/settings/tokens/new?scopes=write:packages`。

{% endwarning %}

Expand All @@ -19,7 +19,7 @@ ms.locfileid: "145100394"

有关详细信息,请参阅“[为命令行创建个人访问令牌](/github/authenticating-to-github/creating-a-personal-access-token-for-the-command-line)”。

2. 保存您的 PAT。 我们建议将 PAT 保存为环境变量。
2. 保存您的 PAT。我们建议将 PAT 保存为环境变量。
```shell
$ export CR_PAT=YOUR_TOKEN
```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ ms.contentlocale: zh-CN
ms.lasthandoff: 09/05/2022
ms.locfileid: "147410715"
---
{% data variables.product.prodname_container_registry %} 将容器映像存储在组织或个人帐户中,并允许你将映像与存储库相关联。 可以选择是从存储库继承权限,还是独立于存储库设置精细权限。 你也可以匿名访问公共容器映像。
{% data variables.product.prodname_container_registry %} 将容器映像存储在组织或个人帐户中,并允许你将映像与存储库相关联。可以选择是从存储库继承权限,还是独立于存储库设置精细权限。你也可以匿名访问公共容器映像。
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ ms.locfileid: "145100390"

注意:{% data variables.product.product_name %} 的 {% data variables.product.prodname_container_registry %} 当前为 beta 版本,可能会有变化。

必须启用 {% data variables.product.prodname_registry %} 和子域隔离才能使用 {% data variables.product.prodname_container_registry %}。 有关详细信息,请参阅“[使用容器注册表](/packages/working-with-a-github-packages-registry/working-with-the-container-registry)”。
必须启用 {% data variables.product.prodname_registry %} 和子域隔离才能使用 {% data variables.product.prodname_container_registry %}。有关详细信息,请参阅“[使用容器注册表](/packages/working-with-a-github-packages-registry/working-with-the-container-registry)”。

{% endnote %}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ ms.contentlocale: zh-CN
ms.lasthandoff: 09/10/2022
ms.locfileid: "147410696"
---
{% data variables.product.product_name %} 3.6 支持迁移存储在组织中的 Docker 映像。 未来的版本将支持迁移用户拥有的映像。
{% data variables.product.product_name %} 3.6 支持迁移存储在组织中的 Docker 映像。未来的版本将支持迁移用户拥有的映像。
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ ms.contentlocale: zh-CN
ms.lasthandoff: 09/10/2022
ms.locfileid: "147877205"
---
2. 在与 `package.json` 文件相同的目录中,创建或编辑 `.npmrc` 文件以包含指定 {% data variables.product.prodname_registry %} URL 和帐户所有者的行。 将 `OWNER` 替换为拥有项目所在存储库的用户或组织帐户的名称。
2. 在与 `package.json` 文件相同的目录中,创建或编辑 `.npmrc` 文件以包含指定 {% data variables.product.prodname_registry %} URL 和帐户所有者的行。将 `OWNER` 替换为拥有项目所在存储库的用户或组织帐户的名称。

{% ifversion fpt or ghec %}
```shell
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ ms.contentlocale: zh-CN
ms.lasthandoff: 09/10/2022
ms.locfileid: "145100373"
---
作为下一步,您可以自定义您想要提供给最终用户的 {% data variables.product.product_location %} 软件包生态系统。 有关详细信息,请参阅“[为企业配置包生态系统支持](/admin/packages/configuring-package-ecosystem-support-for-your-enterprise)”。
作为下一步,您可以自定义您想要提供给最终用户的 {% data variables.product.product_location %} 软件包生态系统。有关详细信息,请参阅“[为企业配置包生态系统支持](/admin/packages/configuring-package-ecosystem-support-for-your-enterprise)”。

有关在 {% data variables.product.prodname_dotcom %} 上使用 {% data variables.product.prodname_registry %} 的概述,请参阅“[开始为你的企业使用 GitHub Packages](/admin/packages/getting-started-with-github-packages-for-your-enterprise)”。
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ ms.contentlocale: zh-CN
ms.lasthandoff: 09/10/2022
ms.locfileid: "147876092"
---
在包页面上,{% data variables.product.prodname_dotcom %} 为每个版本提供元数据,例如发布日期。 您可以查看包的详细信息,包括描述和安装以及使用说明。 您可以下载与包相关联的任何资产并查看有关下载活动的信息。 有关示例包页面,请参阅 [@Codertocat/hello-world-npm](https://github.com/Codertocat/hello-world-npm/packages/10696?version=1.0.1)。
在包页面上,{% data variables.product.prodname_dotcom %} 为每个版本提供元数据,例如发布日期。您可以查看包的详细信息,包括描述和安装以及使用说明。您可以下载与包相关联的任何资产并查看有关下载活动的信息。有关示例包页面,请参阅 [@Codertocat/hello-world-npm](https://github.com/Codertocat/hello-world-npm/packages/10696?version=1.0.1)。
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ ms.contentlocale: zh-CN
ms.lasthandoff: 09/12/2022
ms.locfileid: "145100371"
---
如果使用的是 {% data variables.product.prodname_actions %} 工作流,可使用 `GITHUB_TOKEN` 发布和使用 {% data variables.product.prodname_registry %} 中的包,而无需存储和管理个人访问令牌。 有关详细信息,请参阅“[使用 `GITHUB_TOKEN` 进行身份验证](/actions/automating-your-workflow-with-github-actions/authenticating-with-the-github_token)”。
如果使用的是 {% data variables.product.prodname_actions %} 工作流,可使用 `GITHUB_TOKEN` 发布和使用 {% data variables.product.prodname_registry %} 中的包,而无需存储和管理个人访问令牌。有关详细信息,请参阅“[使用 `GITHUB_TOKEN` 进行身份验证](/actions/automating-your-workflow-with-github-actions/authenticating-with-the-github_token)”。
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ ms.contentlocale: zh-CN
ms.lasthandoff: 09/11/2022
ms.locfileid: "147883778"
---
公共包免费使用 {% data variables.product.prodname_registry %}。 对于专用包,每个 {% data variables.product.product_location %} 帐户可获得一定数量的免费存储和数据传输,具体取决于帐户所使用的产品。 超出包含数量的任何使用量都由支出限制控制。
公共包免费使用 {% data variables.product.prodname_registry %}。对于专用包,每个 {% data variables.product.product_location %} 帐户可获得一定数量的免费存储和数据传输,具体取决于帐户所使用的产品。超出包含数量的任何使用量都由支出限制控制。
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ ms.contentlocale: zh-CN
ms.lasthandoff: 09/11/2022
ms.locfileid: "145100355"
---
如果您是每月付费的用户,您的帐户默认支出限额为 0 美元,这将防止您在达到包含的限额后额外使用存储或数据传输。 如果按发票支付帐户费用,则帐户将具有无限制的默认支出限制。
如果您是每月付费的用户,您的帐户默认支出限额为 0 美元,这将防止您在达到包含的限额后额外使用存储或数据传输。如果按发票支付帐户费用,则帐户将具有无限制的默认支出限制。
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ ms.locfileid: "147876086"
---
{% data reusables.package_registry.packages-spending-limit-brief %}

如果您的支出限额无限或高于 0 美元,您将会收到额外存储或数据传输的帐单,也称为超限费用,最高可达到您的支出限额。 您帐户中的任何优惠券都不适用于 {% data variables.product.prodname_registry %} 超额费用。
如果您的支出限额无限或高于 0 美元,您将会收到额外存储或数据传输的帐单,也称为超限费用,最高可达到您的支出限额。您帐户中的任何优惠券都不适用于 {% data variables.product.prodname_registry %} 超额费用。

{% data reusables.billing.overages-billed-monthly %}
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ ms.contentlocale: zh-CN
ms.lasthandoff: 09/10/2022
ms.locfileid: "145100350"
---
您必须使用具有适当范围的个人访问令牌才可在 {% data variables.product.prodname_registry %} 中发布和安装。 有关详细信息,请参阅“[关于 {% data variables.product.prodname_registry %}](/packages/learn-github-packages/about-github-packages#authenticating-to-github-packages)”。
您必须使用具有适当范围的个人访问令牌才可在 {% data variables.product.prodname_registry %} 中发布和安装。有关详细信息,请参阅“[关于 {% data variables.product.prodname_registry %}](/packages/learn-github-packages/about-github-packages#authenticating-to-github-packages)”。
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ ms.contentlocale: zh-CN
ms.lasthandoff: 09/05/2022
ms.locfileid: "147410585"
---
1. 验证项目 package.json 中的 `repository` 字段。 `repository` 字段必须与 {% data variables.product.prodname_dotcom %} 存储库的 URL 匹配。 例如,如果存储库 URL 是 `github.com/my-org/test`,则存储库字段应为 `https://github.com/my-org/test.git`。
1. 验证项目 package.json 中的 `repository` 字段。 `repository` 字段必须与 {% data variables.product.prodname_dotcom %} 存储库的 URL 匹配。例如,如果存储库 URL 是 `github.com/my-org/test`,则存储库字段应为 `https://github.com/my-org/test.git`。
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ ms.contentlocale: zh-CN
ms.lasthandoff: 09/10/2022
ms.locfileid: "145100338"
---
在发布包后,您可以在 {% data variables.product.prodname_dotcom %} 上查看该包。 有关详细信息,请参阅“[查看包](/packages/manage-packages/viewing-packages)”。
在发布包后,您可以在 {% data variables.product.prodname_dotcom %} 上查看该包。有关详细信息,请参阅“[查看包](/packages/manage-packages/viewing-packages)”。
Loading