Skip to content

Commit 199f62c

Browse files
authored
Update 2b-github-actions-essential-features.md
1 parent 112bf33 commit 199f62c

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

learn-pr/github/github-actions-ci/includes/2b-github-actions-essential-features.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ jobs:
139139

140140
## Use default context in a workflow
141141

142-
Default environment variables are set by GitHub and not defined in a workflow. They are thus available to use in a workflow in the appropriate context. Most of these variables, other than `CI`, begin with `GITHUB_*` or `RUNNER_*`. The latter two types cannot be overwritten. As well, these default variables have a corresponding, and similarly named, context property. For instance, the `RUNNER_*` series of default variables have a matching context property of `runner.*`. An example of accessing default variables in a workflow leveraging these methods can be viewed here:
142+
Default environment variables are set by GitHub and not defined in a workflow. They are thus available to use in a workflow in the appropriate context. Most of these variables, other than `CI`, begin with `GITHUB_*` or `RUNNER_*`. The latter two types cannot be overwritten. As well, these default variables have a corresponding, and similarly named, context property. For instance, the `RUNNER_*` series of default variables have a matching context property of `runner.*`. An example of accessing default variables in a workflow applying these methods can be viewed here:
143143

144144
```yml
145145
on: workflow_dispatch
@@ -156,13 +156,13 @@ jobs:
156156
run: echo "The operating system on the runner is not Windows, it's $RUNNER_OS."
157157
```
158158

159-
For more information see [Default environment variables](https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/store-information-in-variables#default-environment-variables) in the GitHub user documentation.
159+
For more information, see [Default environment variables](https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/store-information-in-variables#default-environment-variables) in the GitHub user documentation.
160160

161161
## Pass custom environment variables to a workflow
162162

163-
You can pass customer environment variables from one step of a workflow job to subsequent steps within the job. Simply generate a value in one step of a job, and assign the value to an existing or new environment variable. Next, you write the variable/value pair to the GITHUB_ENV environment file. The environment file can then be used directly by an action, or from a shell command in the workflow job by using the `run` keyword.
163+
You can pass customer environment variables from one step of a workflow job to subsequent steps within the job. Simply generate a value in one step of a job, and assign the value to an existing or new environment variable. Next, you write the variable/value pair to the GITHUB_ENV environment file. The environment file can be used by an action, or from a shell command in the workflow job by using the `run` keyword.
164164

165-
The step that creates or updates the environment variable does not have access to the new value, but all subsequent steps in a job will have access.
165+
The step that creates or updates the environment variable doesn't have access to the new value, but all subsequent steps in a job have access.
166166

167167
You can view an example here:
168168

@@ -198,7 +198,7 @@ You can add protection rules for environments defined for your GitHub repository
198198

199199
Environments are used to describe a general deployment target like production, staging, or development. When a GitHub Actions workflow deploys to an environment, the environment is displayed on the main page of the repository. You can use environments to require approval for a job to proceed, restrict which branches can trigger a workflow, gate deployments with custom deployment protection rules, or limit access to secrets.
200200

201-
Each job in a workflow can reference a single environment. Any protection rules configured for the environment must pass before a job referencing the environment is sent to a runner. Note that the job can access the environment's secrets only after the job is sent to a runner.
201+
Each job in a workflow can reference a single environment. Any protection rules configured for the environment must pass before a job referencing the environment is sent to a runner. The job can access the environment's secrets only after the job is sent to a runner.
202202

203203
When a workflow references an environment, the environment will appear in the repository's deployments.
204204

@@ -208,7 +208,7 @@ Environment deployment protection rules require specific conditions to pass befo
208208

209209
1. **Required reviewers protection rules**: Use required reviewers to require a specific person or team to approve workflow jobs that reference the environment. You can list up to six users or teams as reviewers. The reviewers must have at least read access to the repository. Only one of the required reviewers needs to approve the job for it to proceed.
210210

211-
You also have the option to prevent self-reviews for deployments to protected environments. If you enable this setting, users who initiate a deployment cannot approve the deployment job, even if they are a required reviewer. This ensures that deployments to protected environments are always reviewed by more than one person.
211+
You also have the option to prevent self-reviews for deployments to protected environments. If you enable this setting, users who initiate a deployment cannot approve the deployment job, even if they're a required reviewer. By enabling self-reviews, it ensures that deployments to protected environments are always reviewed by more than one person.
212212

213213
For more information on reviewing jobs that reference an environment with required reviewers, see [Reviewing deployments](https://docs.github.com/en/actions/managing-workflow-runs-and-deployments/managing-deployments/reviewing-deployments#bypassing-environment-protection-rules).
214214

@@ -218,7 +218,7 @@ Environment deployment protection rules require specific conditions to pass befo
218218

219219
- **No restriction** sets no restriction on which branch or tag can deploy to the environment. **Protected branches only** allows only branches with branch protection rules enabled to deploy to the environment. If no branch protection rules are defined for any branch in the repository, then all branches can deploy. The **Selected branches and tags** setting ensures Only branches and tags that match your specified name patterns can deploy to the environment.
220220

221-
- If you specify `releases/*` as a deployment branch or tag rule, only a branch or tag whose name begins with `releases/` can deploy to the environment. (Wildcard characters will not match `/`. To match branches or tags that begin with `release/` and contain an additional single slash, use `release/*/*`.) If you add `main` as a branch rule, a branch named `main` can also deploy to the environment. For more information about syntax options for deployment branches
221+
- If you specify `releases/*` as a deployment branch or tag rule, only a branch or tag whose name begins with `releases/` can deploy to the environment. (Wildcard characters will not match `/`. To match branches or tags that begin with `release/` and contain an additional single slash, use `release/*/*`.) If you add `main` as a branch rule, a branch named `main` can also deploy to the environment.
222222

223223
4. **Custom deployment protection rules:** You can enable your own custom protection rules to gate deployments with third-party services. For instance, you can use observability systems, change management systems, code quality systems, or other manual configurations that you use to assess readiness and provide automated approvals for deployments to GitHub.
224224

0 commit comments

Comments
 (0)