Skip to content

Commit cd82923

Browse files
authored
Merge pull request github#16421 from github/repo-sync
repo sync
2 parents 07e7369 + 60b739e commit cd82923

12 files changed

+109
-108
lines changed

translations/log/cn-resets.csv

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-gith
99
translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-github-user-account/managing-user-account-settings/managing-the-default-branch-name-for-your-repositories.md,broken liquid tags
1010
translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-github-user-account/managing-your-membership-in-organizations/about-organization-membership.md,broken liquid tags
1111
translations/zh-CN/content/actions/automating-builds-and-tests/about-continuous-integration.md,broken liquid tags
12+
translations/zh-CN/content/actions/deployment/about-deployments/deploying-with-github-actions.md,broken liquid tags
1213
translations/zh-CN/content/actions/hosting-your-own-runners/about-self-hosted-runners.md,broken liquid tags
1314
translations/zh-CN/content/actions/hosting-your-own-runners/adding-self-hosted-runners.md,Listed in localization-support#489
1415
translations/zh-CN/content/actions/hosting-your-own-runners/adding-self-hosted-runners.md,broken liquid tags
@@ -270,7 +271,7 @@ translations/zh-CN/data/reusables/rest-reference/activity/events.md,broken liqui
270271
translations/zh-CN/data/reusables/rest-reference/apps/marketplace.md,broken liquid tags
271272
translations/zh-CN/data/reusables/rest-reference/packages/packages.md,broken liquid tags
272273
translations/zh-CN/data/reusables/saml/you-must-periodically-authenticate.md,Listed in localization-support#489
273-
translations/zh-CN/data/reusables/saml/you-must-periodically-authenticate.md,broken liquid tags
274+
translations/zh-CN/data/reusables/saml/you-must-periodically-authenticate.md,rendering error
274275
translations/zh-CN/data/reusables/scim/after-you-configure-saml.md,broken liquid tags
275276
translations/zh-CN/data/reusables/secret-scanning/enterprise-enable-secret-scanning.md,broken liquid tags
276277
translations/zh-CN/data/reusables/sponsors/feedback.md,broken liquid tags

translations/zh-CN/content/actions/deployment/about-deployments/deploying-with-github-actions.md

Lines changed: 33 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
2-
title: 使用 GitHub Actions 进行部署
3-
intro: 了解如何使用环境和并发性等功能控制部署。
2+
title: Deploying with GitHub Actions
3+
intro: Learn how to control deployments with features like environments and concurrency.
44
versions:
55
fpt: '*'
66
ghes: '*'
@@ -11,35 +11,35 @@ redirect_from:
1111
- /actions/deployment/deploying-with-github-actions
1212
topics:
1313
- CD
14-
shortTitle: 使用 GitHub Actions 进行部署
14+
shortTitle: Deploy with GitHub Actions
1515
---
1616

1717
{% data reusables.actions.enterprise-beta %}
1818
{% data reusables.actions.enterprise-github-hosted-runners %}
1919

20-
## 简介
20+
## Introduction
2121

22-
{% data variables.product.prodname_actions %} 提供了允许您控制部署的功能。 您可以:
22+
{% data variables.product.prodname_actions %} offers features that let you control deployments. You can:
2323

24-
- 使用各种事件触发工作流程。
25-
- 配置环境以在作业可以继续之前设置规则,并限制对机密的访问。
26-
- 使用并发性来控制一次运行的部署数。
24+
- Trigger workflows with a variety of events.
25+
- Configure environments to set rules before a job can proceed and to limit access to secrets.
26+
- Use concurrency to control the number of deployments running at a time.
2727

28-
有关持续部署的更多信息,请参阅“[关于持续部署](/actions/deployment/about-continuous-deployment)”。
28+
For more information about continuous deployment, see "[About continuous deployment](/actions/deployment/about-continuous-deployment)."
2929

30-
## 基本要求
30+
## Prerequisites
3131

32-
您应该熟悉 {% data variables.product.prodname_actions %} 的语法。 更多信息请参阅“[Learn {% data variables.product.prodname_actions %}](/actions/learn-github-actions)”。
32+
You should be familiar with the syntax for {% data variables.product.prodname_actions %}. For more information, see "[Learn {% data variables.product.prodname_actions %}](/actions/learn-github-actions)."
3333

34-
## 触发部署
34+
## Triggering your deployment
3535

36-
您可以使用各种事件来触发您的部署工作流程。 最常见的有:`pull_request``put``Workflow_paid`
36+
You can use a variety of events to trigger your deployment workflow. Some of the most common are: `pull_request`, `push`, and `workflow_dispatch`.
3737

38-
例如,具有以下触发器的工作流在以下情况下会运行:
38+
For example, a workflow with the following triggers runs whenever:
3939

40-
- 有人推送到 `main` 分支。
41-
- 打开、同步或重新打开面向 `main` 分支的拉取请求。
42-
- 有人手动触发它。
40+
- There is a push to the `main` branch.
41+
- A pull request targeting the `main` branch is opened, synchronized, or reopened.
42+
- Someone manually triggers it.
4343

4444
```yaml
4545
on:
@@ -52,23 +52,23 @@ on:
5252
workflow_dispatch:
5353
```
5454
55-
更多信息请参阅“[触发工作流程的事件](/actions/reference/events-that-trigger-workflows)”。
55+
For more information, see "[Events that trigger workflows](/actions/reference/events-that-trigger-workflows)."
5656
57-
## 使用环境
57+
## Using environments
5858
5959
{% data reusables.actions.about-environments %}
6060
61-
## 使用并发
61+
## Using concurrency
6262
63-
并发确保只有使用相同并发组的单一作业或工作流程才会同时运行。 您可以使用并发,以便环境中每次最多有一个正在进行的部署和一个待处理的部署。
63+
Concurrency ensures that only a single job or workflow using the same concurrency group will run at a time. You can use concurrency so that an environment has a maximum of one deployment in progress and one deployment pending at a time.
6464
6565
{% note %}
6666
67-
**注意**:`concurrency` `environment` 未连接。 并发值可以是任何字符串;它无需是环境名称。 此外,如果另一个工作流程使用相同的环境,但未指定并发性,则该工作流程将不受任何并发规则的约束。
67+
**Note:** `concurrency` and `environment` are not connected. The concurrency value can be any string; it does not need to be an environment name. Additionally, if another workflow uses the same environment but does not specify concurrency, that workflow will not be subject to any concurrency rules.
6868

6969
{% endnote %}
7070

71-
例如,当以下工作流程运行时,如果正在进行使用 `production` 并发组的任何作业或工作流程,则该工作流程将暂停,且状态为 `pending`。 它还将取消使用 `production` 并发组并且状态为 `pending` 的任何作业或工作流程。 这意味着最多将有一个正在运行的作业或工作流程和一个使用 `production` 并发组的挂起作业或工作流程。
71+
For example, when the following workflow runs, it will be paused with the status `pending` if any job or workflow that uses the `production` concurrency group is in progress. It will also cancel any job or workflow that uses the `production` concurrency group and has the status `pending`. This means that there will be a maximum of one running and one pending job or workflow in that uses the `production` concurrency group.
7272

7373
```yaml
7474
name: Deployment
@@ -89,7 +89,7 @@ jobs:
8989
# ...deployment-specific steps
9090
```
9191

92-
您也可以在作业级别指定并发性。 这将允许工作流中的其他作业继续,即使并发作业状态为 `pending`
92+
You can also specify concurrency at the job level. This will allow other jobs in the workflow to proceed even if the concurrent job is `pending`.
9393

9494
```yaml
9595
name: Deployment
@@ -109,7 +109,7 @@ jobs:
109109
# ...deployment-specific steps
110110
```
111111

112-
还可以使用 `cancel-in-progress` 取消同一并发组中任何当前正在运行的作业或工作流程。
112+
You can also use `cancel-in-progress` to cancel any currently running job or workflow in the same concurrency group.
113113

114114
```yaml
115115
name: Deployment
@@ -132,19 +132,19 @@ jobs:
132132
# ...deployment-specific steps
133133
```
134134

135-
有关编写特定于部署的步骤的指导,请参阅“[查找部署示例](#finding-deployment-examples)”。
135+
For guidance on writing deployment-specific steps, see "[Finding deployment examples](#finding-deployment-examples)."
136136

137-
## 查看部署历史记录
137+
## Viewing deployment history
138138

139139
When a {% data variables.product.prodname_actions %} workflow deploys to an environment, the environment is displayed on the main page of the repository. For more information about viewing deployments to environments, see "[Viewing deployment history](/developers/overview/viewing-deployment-history)."
140140

141-
## 监控工作流程运行
141+
## Monitoring workflow runs
142142

143-
每个工作流程运行都会生成一个实时图表,说明运行进度。 您可以使用此图表来监控和调试部署。 更多信息请参阅“[使用可视化图](/actions/monitoring-and-troubleshooting-workflows/using-the-visualization-graph)”。
143+
Every workflow run generates a real-time graph that illustrates the run progress. You can use this graph to monitor and debug deployments. For more information see, "[Using the visualization graph](/actions/monitoring-and-troubleshooting-workflows/using-the-visualization-graph)."
144144

145-
您还可以查看每个工作流程运行的日志和工作流程运行的历史记录。 更多信息请参阅“[查看工作流程运行历史记录](/actions/monitoring-and-troubleshooting-workflows/viewing-workflow-run-history)”。
145+
You can also view the logs of each workflow run and the history of workflow runs. For more information, see "[Viewing workflow run history](/actions/monitoring-and-troubleshooting-workflows/viewing-workflow-run-history)."
146146

147-
## 通过应用跟踪部署
147+
## Tracking deployments through apps
148148

149149
{% ifversion fpt or ghec %}
150150
If your personal account or organization on {% ifversion ghae %}{% data variables.product.product_name %}{% else %}{% data variables.product.product_location %}{% endif %} is integrated with Microsoft Teams or Slack, you can track deployments that use environments through Microsoft Teams or Slack. For example, you can receive notifications through the app when a deployment is pending approval, when a deployment is approved, or when the deployment status changes. For more information about integrating Microsoft Teams or Slack, see "[GitHub extensions and integrations](/github/customizing-your-github-workflow/exploring-integrations/github-extensions-and-integrations#team-communication-tools)."
@@ -154,7 +154,7 @@ You can also build an app that uses deployment and deployment status webhooks to
154154

155155
{% ifversion fpt or ghes or ghec %}
156156

157-
## 选择运行器
157+
## Choosing a runner
158158

159159
You can run your deployment workflow on {% data variables.product.company_short %}-hosted runners or on self-hosted runners. Traffic from {% data variables.product.company_short %}-hosted runners can come from a [wide range of network addresses](/rest/reference/meta#get-github-meta-information). If you are deploying to an internal environment and your company restricts external traffic into private networks, {% data variables.product.prodname_actions %} workflows running on {% data variables.product.company_short %}-hosted runners may not be communicate with your internal services or resources. To overcome this, you can host your own runners. For more information, see "[About self-hosted runners](/actions/hosting-your-own-runners/about-self-hosted-runners)" and "[About GitHub-hosted runners](/actions/using-github-hosted-runners/about-github-hosted-runners)."
160160

@@ -164,7 +164,7 @@ You can run your deployment workflow on {% data variables.product.company_short
164164

165165
You can use a status badge to display the status of your deployment workflow. {% data reusables.repositories.actions-workflow-status-badge-intro %}
166166

167-
更多信息请参阅“[添加工作流程状态徽章](/actions/managing-workflow-runs/adding-a-workflow-status-badge)”。
167+
For more information, see "[Adding a workflow status badge](/actions/managing-workflow-runs/adding-a-workflow-status-badge)."
168168

169169
## Finding deployment examples
170170

translations/zh-CN/content/actions/deployment/deploying-to-your-cloud-provider/deploying-to-google-kubernetes-engine.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,15 @@ topics:
1414
- CD
1515
- Containers
1616
- Google Kubernetes Engine
17-
shortTitle: Deploy to Google Kubernetes Engine
17+
shortTitle: 部署到 Google Kubernetes Engine
1818
---
1919

2020
{% data reusables.actions.enterprise-beta %}
2121
{% data reusables.actions.enterprise-github-hosted-runners %}
2222

2323
## 简介
2424

25-
This guide explains how to use {% data variables.product.prodname_actions %} to build a containerized application, push it to Google Container Registry (GCR), and deploy it to Google Kubernetes Engine (GKE) when there is a push to the `main` branch.
25+
本指南介绍如何使用 {% data variables.product.prodname_actions %} 构建容器化应用程序,将其推送到 Google Container Registry (GCR),以及要推送到 `main` 分支时将其部署到 Google Kubernetes Engine (GKE)
2626

2727
GKE 是 Google Cloud 的托管 Kubernetes 群集服务,可以在云中或您自己的数据中心中托管您的容器化工作负载。 更多信息请参阅 [Google Kubernetes Engine](https://cloud.google.com/kubernetes-engine)
2828

@@ -71,7 +71,7 @@ $ gcloud services enable \
7171

7272
### 配置服务帐户并存储其凭据
7373

74-
此程序显示如何为您的 GKE 集成创建服务帐户。 It explains how to create the account, add roles to it, retrieve its keys, and store them as a base64-encoded encrypted repository secret named `GKE_SA_KEY`.
74+
此程序显示如何为您的 GKE 集成创建服务帐户。 它说明了如何创建帐户、向其添加角色、检索其密钥,以及将它们存储为名为 `GKE_SA_KEY` 的加密仓库机密。
7575

7676
1. 创建新服务帐户:
7777
{% raw %}
@@ -111,16 +111,16 @@ $ gcloud services enable \
111111
$ export GKE_SA_KEY=$(cat key.json | base64)
112112
```
113113
{% endraw %}
114-
For more information about how to store a secret, see "[Encrypted secrets](/actions/security-guides/encrypted-secrets)."
114+
有关如何存储机密的更多信息,请参阅“[加密密码](/actions/security-guides/encrypted-secrets)”。
115115

116-
### Storing your project name
116+
### 存储项目名称
117117

118-
Store the name of your project as a secret named `GKE_PROJECT`. For more information about how to store a secret, see "[Encrypted secrets](/actions/security-guides/encrypted-secrets)."
118+
将项目名称存储为名为 `GKE_PROJECT` 的机密。 有关如何存储机密的更多信息,请参阅“[加密密码](/actions/security-guides/encrypted-secrets)”。
119119

120120
### (可选)配置 kustomize
121-
Kustomize 是用于管理 YAML 规范的可选工具。 After creating a `kustomization` file, the workflow below can be used to dynamically set fields of the image and pipe in the result to `kubectl`. 更多信息请参阅 [kustomize 的用法](https://github.com/kubernetes-sigs/kustomize#usage)
121+
Kustomize 是用于管理 YAML 规范的可选工具。 在创建 `kustomization` 文件之后, 下面的工作流可用于将结果中的图像和管道字段动态设置为 `kubectl` 更多信息请参阅 [kustomize 的用法](https://github.com/kubernetes-sigs/kustomize#usage)
122122

123-
### (Optional) Configure a deployment environment
123+
### (可选)配置部署环境
124124

125125
{% data reusables.actions.about-environments %}
126126

@@ -130,7 +130,7 @@ Kustomize 是用于管理 YAML 规范的可选工具。 After creating a `kustom
130130

131131
下面的示例工作流程演示如何生成容器映像并推送到 GCR。 然后,它使用 Kubernetes 工具(如 `kubectl``kustomize`)将映像拉入群集部署。
132132

133-
Under the `env` key, change the value of `GKE_CLUSTER` to the name of your cluster, `GKE_ZONE` to your cluster zone, `DEPLOYMENT_NAME` to the name of your deployment, and `IMAGE` to the name of your image.
133+
`env` 键下,将 `GKE_CLUSTER` 的值更改为群集的名称,将 `GKE_ZONE` 更改为群集区域,将 `DEPLOYMENT_NAME` 更改为部署的名称,以及将 `IMAGE` 更改为映像的名称。
134134

135135
{% data reusables.actions.delete-env-key %}
136136

translations/zh-CN/content/actions/deployment/security-hardening-your-deployments/about-security-hardening-with-openid-connect.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ You could also use a `curl` command to request the JWT, using the following envi
226226
curl -H "Authorization: bearer $ACTIONS_ID_TOKEN_REQUEST_TOKEN" "$ACTIONS_ID_TOKEN_REQUEST_URL&audience=api://AzureADTokenExchange"
227227
```
228228

229-
### Adding permissions settings
229+
### 添加权限设置
230230

231231
{% data reusables.actions.oidc-permissions-token %}
232232

translations/zh-CN/content/actions/deployment/security-hardening-your-deployments/configuring-openid-connect-in-amazon-web-services.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,11 +51,11 @@ Edit the trust relationship to add the `sub` field to the validation conditions.
5151

5252
## 更新 {% data variables.product.prodname_actions %} 工作流程
5353

54-
To update your workflows for OIDC, you will need to make two changes to your YAML:
55-
1. Add permissions settings for the token.
54+
要更新 OIDC 的工作流程,您需要对 YAML 进行两项更改:
55+
1. 为令牌添加权限设置。
5656
2. Use the [`aws-actions/configure-aws-credentials`](https://github.com/aws-actions/configure-aws-credentials) action to exchange the OIDC token (JWT) for a cloud access token.
5757

58-
### Adding permissions settings
58+
### 添加权限设置
5959

6060
 {% data reusables.actions.oidc-permissions-token %}
6161

translations/zh-CN/content/actions/deployment/security-hardening-your-deployments/configuring-openid-connect-in-azure.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,11 +44,11 @@ Additional guidance for configuring the identity provider:
4444

4545
## 更新 {% data variables.product.prodname_actions %} 工作流程
4646

47-
To update your workflows for OIDC, you will need to make two changes to your YAML:
48-
1. Add permissions settings for the token.
47+
要更新 OIDC 的工作流程,您需要对 YAML 进行两项更改:
48+
1. 为令牌添加权限设置。
4949
2. Use the [`azure/login`](https://github.com/Azure/login) action to exchange the OIDC token (JWT) for a cloud access token.
5050

51-
### Adding permissions settings
51+
### 添加权限设置
5252

5353
 {% data reusables.actions.oidc-permissions-token %}
5454

0 commit comments

Comments
 (0)