Skip to content

Commit c9d7293

Browse files
Sarah Edwardslucascosti
andauthored
Version deployment environments and the environment APIs for GHES 3.2 (#18397)
Co-authored-by: Lucas Costi <lucascosti@users.noreply.github.com>
1 parent 20ec93e commit c9d7293

4 files changed

Lines changed: 8 additions & 7 deletions

File tree

content/actions/managing-workflow-runs/reviewing-deployments.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ versions:
1515

1616
Jobs that reference an environment configured with required reviewers will wait for an approval before starting. While a job is awaiting approval, it has a status of "Waiting". If a job is not approved within 30 days, the workflow run will be automatically canceled.
1717

18-
For more information about environments and required approvals, see "[Environments](/actions/reference/environments)." For information about how to review deployments with the REST API, see "[Workflow Runs](/rest/reference/actions#workflow-runs)."
18+
For more information about environments and required approvals, see "[Environments](/actions/reference/environments)."{% if currentVersion == "free-pro-team@latest" or currentVersion == "github-ae@next" or currentVersion ver_gt "enterprise-server@3.1" %} For information about how to review deployments with the REST API, see "[Workflow Runs](/rest/reference/actions#workflow-runs)."{% endif %}
1919

2020
### Approving or rejecting a job
2121

content/actions/reference/environments.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ Environment protection rules and environment secrets are only available on publi
2121

2222
#### Environment protection rules
2323

24-
Environment protection rules require specific conditions to pass before a job referencing the environment can proceed. You can use environment protection rules to require a manual approval, delay a job, or restrict the environment to certain branches.
24+
Environment protection rules require specific conditions to pass before a job referencing the environment can proceed. {% if currentVersion == "free-pro-team@latest" or currentVersion == "github-ae@next" or currentVersion ver_gt "enterprise-server@3.1" %}You can use environment protection rules to require a manual approval, delay a job, or restrict the environment to certain branches.{% else %}You can use environment protection rules to require a manual approval or delay a job.{% endif %}
2525

2626
##### Required reviewers
2727

@@ -33,6 +33,7 @@ For more information on reviewing jobs that reference an environment with requir
3333

3434
Use a wait timer to delay a job for a specific amount of time after the job is initially triggered. The time (in minutes) must be an integer between 0 and 43,200 (30 days).
3535

36+
{% if currentVersion == "free-pro-team@latest" or currentVersion == "github-ae@next" or currentVersion ver_gt "enterprise-server@3.1" %}
3637
##### Deployment branches
3738

3839
Use deployment branches to restrict which branches can deploy to the environment. Below are the options for deployment branches for an environment:
@@ -42,7 +43,7 @@ Use deployment branches to restrict which branches can deploy to the environment
4243
* **Selected branches**: Only branches that match your specified name patterns can deploy to the environment.
4344

4445
For example, if you specify `releases/*` as a deployment branch rule, only branches whose name begins with `releases/` can deploy to the environment. (Wildcard characters will not match `/`. To match branches that begin with `release/` and contain an additional single slash, use `release/*/*`.) If you add `main` as a deployment branch rule, a branch named `main` can also deploy to the environment. For more information about syntax options for deployment branches, see the [Ruby File.fnmatch documentation](https://ruby-doc.org/core-2.5.1/File.html#method-c-fnmatch).
45-
46+
{% endif %}
4647
#### Environment secrets
4748

4849
Secrets stored in an environment are only available to workflow jobs that reference the environment. If the environment requires approval, a job cannot access environment secrets until one of the required reviewers approves it. For more information about secrets, see "[Encrypted secrets](/actions/reference/encrypted-secrets)."
@@ -58,7 +59,7 @@ Secrets stored in an environment are only available to workflow jobs that refere
5859
1. Enter a name for the environment, then click **Configure environment**. Environment names are not case sensitive. An environment name may not exceed 255 characters and must be unique within the repository.
5960
1. Configure any environment protection rules or environment secrets.
6061

61-
You can also create and configure environments through the REST API. For more information, see "[Environments](/rest/reference/repos#environments)" and "[Secrets](/rest/reference/actions#secrets)."
62+
{% if currentVersion == "free-pro-team@latest" or currentVersion == "github-ae@next" or currentVersion ver_gt "enterprise-server@3.1" %}You can also create and configure environments through the REST API. For more information, see "[Environments](/rest/reference/repos#environments)" and "[Secrets](/rest/reference/actions#secrets)."{% endif %}
6263

6364
Running a workflow that references an environment that does not exist will create an environment with the referenced name. The newly created environment will not have any protection rules or secrets configured. Anyone that can edit workflows in the repository can create environments via a workflow file, but only repository admins can configure the environment.
6465

@@ -82,4 +83,4 @@ Deleting an environment will delete all secrets and protection rules associated
8283
1. Next the the environment that you want to delete, click {% octicon "trashcan" aria-label="The trashcan icon" %}.
8384
2. Click **I understand, delete this environment**.
8485

85-
You can also delete environments through the REST API. For more information, see "[Environments](/rest/reference/repos#environments)."
86+
{% if currentVersion == "free-pro-team@latest" or currentVersion == "github-ae@next" or currentVersion ver_gt "enterprise-server@3.1" %}You can also delete environments through the REST API. For more information, see "[Environments](/rest/reference/repos#environments)."{% endif %}

content/rest/reference/repos.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ You can communicate that a transient environment no longer exists by setting its
155155
{% if operation.subcategory == 'deployments' %}{% include rest_operation %}{% endif %}
156156
{% endfor %}
157157

158-
{% if currentVersion == "free-pro-team@latest" or currentVersion ver_gt "enterprise-server@3.0" or currentVersion == "github-ae@latest" %}
158+
{% if currentVersion == "free-pro-team@latest" or currentVersion ver_gt "enterprise-server@3.1" or currentVersion == "github-ae@next" %}
159159
## Environments
160160

161161
The Environments API allows you to create, configure, and delete environments. For more information about environments, see "[Environments](/actions/reference/environments)."
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
Encrypted secrets allow you to store sensitive information, such as access tokens, in your repository{% if currentVersion == "free-pro-team@latest" or currentVersion ver_gt "enterprise-server@3.0" or currentVersion == "github-ae@latest" %}, repository environments,{% endif %} or organization.
1+
Encrypted secrets allow you to store sensitive information, such as access tokens, in your repository{% if currentVersion == "free-pro-team@latest" or currentVersion ver_gt "enterprise-server@3.1" or currentVersion == "github-ae@next" %}, repository environments,{% endif %} or organization.

0 commit comments

Comments
 (0)