Note
This section can be applied to repos/<file>.yml or suborgs/<file>.yml. It will most commonly appear in the individual repos though.
...
teams:
# This team must be given explicit permission
# before we can add them as a reviewer below
- name: super-friends
permission: write
collaborators:
# This user must be given explicit permission
# before we can add them as a reviewer below
- username: KalEl
permission: write
environments:
- name: production
wait_timer: 0
prevent_self_review: true
reviewers:
- type: Team
id: 1234647
- type: User
id: 139262123
deployment_branch_policy:
protected_branches: false
custom_branch_policies:
- names: ['main','dev']
type: branch
- names: ['v*.*.*']
type: tag
deployment_protection_rules:
- app_id: 25112
variables:
- name: MY_AWESOME_VAR
value: '845705'
- name: my_lowercase_var
value: I have spacesTip
GitHub's API documentation defines these inputs and types:
|
This is the name of the environment, and will be what is referenced in a workflow with |
Example:
environments:
- name: dms-prod-example
... |
|
The amount of time to delay a job after the job is initially triggered. The time (in minutes) must be an integer between 0 and 43,200 (30 days). |
Example:
environments:
- name: dms-prod-example
wait_timer: 30
... |
|
Whether or not a user who created the job is prevented from approving their own job. |
Example:
environments:
- name: dms-prod-example
prevent_self_review: true
... |
|
The people or teams that may review jobs that reference the environment. You can list up to six users or teams as reviewers. The reviewers must be given explicit access to the repository as either a team or collaborator. Only one of the required reviewers needs to approve the job for it to proceed. Properties of
|
environments:
- name: production
prevent_self_review: true
reviewers:
- type: Team
id: 1234647
- type: User
id: 139262123
... |
|
The type of deployment branch policy for this environment. To allow all branches to deploy, set to Properties of
|
Example:
environments:
- name: production
...
deployment_branch_policy:
protected_branches: false
custom_branch_policies:
- names: ['main','dev']
type: branch
- names: ['v*.*.*']
type: tag
... |
|
Environment variables that can be referenced in a GitHub Actions workflow Properties of
|
Example:
environments:
- name: production
variables:
- name: MY_AWESOME_VAR
value: super duper value
... |