Skip to content

Commit 9597ed4

Browse files
authored
Branch was updated using the 'autoupdate branch' Actions workflow.
2 parents add1c8a + 7b8cd1a commit 9597ed4

File tree

3 files changed

+34
-25
lines changed

3 files changed

+34
-25
lines changed

.github/allowed-actions.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ module.exports = [
88
'actions/cache@v2',
99
'actions/checkout@v2',
1010
'actions/github-script@0.9.0',
11+
'actions/github-script@v2.0.0',
1112
'actions/github-script@v2',
1213
'actions/github-script@v3',
1314
'actions/labeler@v2',
@@ -25,6 +26,8 @@ module.exports = [
2526
'pascalgn/automerge-action@135f0bdb927d9807b5446f7ca9ecc2c51de03c4a',
2627
'peter-evans/create-issue-from-file@v2',
2728
'peter-evans/create-pull-request@v2',
29+
'rachmari/actions-add-new-issue-to-column@v1.1.1',
30+
'rachmari/labeler@v1.0.4',
2831
'repo-sync/github-sync@v2',
2932
'repo-sync/pull-request@v2',
3033
'rtCamp/action-slack-notify@master',

content/actions/reference/context-and-expression-syntax-for-github-actions.md

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -84,24 +84,24 @@ The `github` context contains information about the workflow run and the event t
8484
| Property name | Type | Description |
8585
|---------------|------|-------------|
8686
| `github` | `object` | The top-level context available during any job or step in a workflow. |
87+
| `github.action` | `string` | The name of the action currently running. {% data variables.product.prodname_dotcom %} removes special characters or uses the name `run` when the current step runs a script. If you use the same action more than once in the same job, the name will include a suffix with the sequence number. For example, the first script you run will have the name `run1`, and the second script will be named `run2`. Similarly, the second invocation of `actions/checkout` will be `actionscheckout2`. |
88+
| `github.action_path` | `string` | The path where your action is located. You can use this path to easily access files located in the same repository as your action. This attribute is only supported in composite run steps actions. |
89+
| `github.actor` | `string` | The login of the user that initiated the workflow run. |
90+
| `github.base_ref` | `string` | The `base_ref` or target branch of the pull request in a workflow run. This property is only available when the event that triggers a workflow run is a `pull_request`. |
8791
| `github.event` | `object` | The full event webhook payload. For more information, see "[Events that trigger workflows](/articles/events-that-trigger-workflows/)." You can access individual properties of the event using this context. |
92+
| `github.event_name` | `string` | The name of the event that triggered the workflow run. |
8893
| `github.event_path` | `string` | The path to the full event webhook payload on the runner. |
89-
| `github.workflow` | `string` | The name of the workflow. If the workflow file doesn't specify a `name`, the value of this property is the full path of the workflow file in the repository. |
94+
| `github.head_ref` | `string` | The `head_ref` or source branch of the pull request in a workflow run. This property is only available when the event that triggers a workflow run is a `pull_request`. |
9095
| `github.job` | `string` | The [`job_id`](/actions/reference/workflow-syntax-for-github-actions#jobsjob_id) of the current job. |
91-
| `github.run_id` | `string` | {% data reusables.github-actions.run_id_description %} |
92-
| `github.run_number` | `string` | {% data reusables.github-actions.run_number_description %} |
93-
| `github.actor` | `string` | The login of the user that initiated the workflow run. |
96+
| `github.ref` | `string` | The branch or tag ref that triggered the workflow run. |
9497
| `github.repository` | `string` | The owner and repository name. For example, `Codertocat/Hello-World`. |
9598
| `github.repository_owner` | `string` | The repository owner's name. For example, `Codertocat`. |
96-
| `github.event_name` | `string` | The name of the event that triggered the workflow run. |
99+
| `github.run_id` | `string` | {% data reusables.github-actions.run_id_description %} |
100+
| `github.run_number` | `string` | {% data reusables.github-actions.run_number_description %} |
97101
| `github.sha` | `string` | The commit SHA that triggered the workflow run. |
98-
| `github.ref` | `string` | The branch or tag ref that triggered the workflow run. |
99-
| `github.head_ref` | `string` | The `head_ref` or source branch of the pull request in a workflow run. This property is only available when the event that triggers a workflow run is a `pull_request`. |
100-
| `github.base_ref` | `string` | The `base_ref` or target branch of the pull request in a workflow run. This property is only available when the event that triggers a workflow run is a `pull_request`. |
101102
| `github.token` | `string` | A token to authenticate on behalf of the GitHub App installed on your repository. This is functionally equivalent to the `GITHUB_TOKEN` secret. For more information, see "[Authenticating with the GITHUB_TOKEN](/actions/automating-your-workflow-with-github-actions/authenticating-with-the-github_token)." |
103+
| `github.workflow` | `string` | The name of the workflow. If the workflow file doesn't specify a `name`, the value of this property is the full path of the workflow file in the repository. |
102104
| `github.workspace` | `string` | The default working directory for steps and the default location of your repository when using the [`checkout`](https://github.com/actions/checkout) action. |
103-
| `github.action` | `string` | The name of the action currently running. {% data variables.product.prodname_dotcom %} removes special characters or uses the name `run` when the current step runs a script. If you use the same action more than once in the same job, the name will include a suffix with the sequence number. For example, the first script you run will have the name `run1`, and the second script will be named `run2`. Similarly, the second invocation of `actions/checkout` will be `actionscheckout2`. |
104-
| `github.action_path` | `string` | The path where your action is located. You can use this path to easily access files located in the same repository as your action. This attribute is only supported in composite run steps actions.
105105

106106
#### **`env` context**
107107

@@ -124,14 +124,14 @@ The `job` context contains information about the currently running job.
124124
| Property name | Type | Description |
125125
|---------------|------|-------------|
126126
| `job` | `object` | This context changes for each job in a workflow run. You can access this context from any step in a job. |
127-
| `job.status` | `string` | The current status of the job. Possible values are `success`, `failure`, or `cancelled`. |
128127
| `job.container` | `object` | Information about the job's container. For more information about containers, see "[Workflow syntax for {% data variables.product.prodname_actions %}](/articles/workflow-syntax-for-github-actions#jobsjob_idcontainer)." |
129-
| `job.container.network` | `string` | The id of the container network. The runner creates the network used by all containers in a job. |
130128
| `job.container.id` | `string` | The id of the container. |
129+
| `job.container.network` | `string` | The id of the container network. The runner creates the network used by all containers in a job. |
131130
| `job.services` | `object` | The service containers created for a job. For more information about service containers, see "[Workflow syntax for {% data variables.product.prodname_actions %}](/articles/workflow-syntax-for-github-actions#jobsjob_idservices)." |
132131
| `job.services.<service id>.id` | `string` | The id of the service container. |
133-
| `job.services.<service id>.ports` | `object` | The exposed ports of the service container. |
134132
| `job.services.<service id>.network` | `string` | The id of the service container network. The runner creates the network used by all containers in a job. |
133+
| `job.services.<service id>.ports` | `object` | The exposed ports of the service container. |
134+
| `job.status` | `string` | The current status of the job. Possible values are `success`, `failure`, or `cancelled`. |
135135

136136
#### **`steps` context**
137137

@@ -141,9 +141,9 @@ The `steps` context contains information about the steps in the current job that
141141
|---------------|------|-------------|
142142
| `steps` | `object` | This context changes for each step in a job. You can access this context from any step in a job. |
143143
| `steps.<step id>.outputs` | `object` | The set of outputs defined for the step. For more information, see "[Metadata syntax for {% data variables.product.prodname_actions %}](/articles/metadata-syntax-for-github-actions#outputs)." |
144-
| `steps.<step id>.outputs.<output name>` | `string` | The value of a specific output. |
145-
| `steps.<step id>.outcome` | `string` | The result of a completed step before [`continue-on-error`](/actions/reference/workflow-syntax-for-github-actions#jobsjob_idstepscontinue-on-error) is applied. Possible values are `success`, `failure`, `cancelled`, or `skipped`. When a `continue-on-error` step fails, the `outcome` is `failure`, but the final `conclusion` is `success`. |
146144
| `steps.<step id>.conclusion` | `string` | The result of a completed step after [`continue-on-error`](/actions/reference/workflow-syntax-for-github-actions#jobsjob_idstepscontinue-on-error) is applied. Possible values are `success`, `failure`, `cancelled`, or `skipped`. When a `continue-on-error` step fails, the `outcome` is `failure`, but the final `conclusion` is `success`. |
145+
| `steps.<step id>.outcome` | `string` | The result of a completed step before [`continue-on-error`](/actions/reference/workflow-syntax-for-github-actions#jobsjob_idstepscontinue-on-error) is applied. Possible values are `success`, `failure`, `cancelled`, or `skipped`. When a `continue-on-error` step fails, the `outcome` is `failure`, but the final `conclusion` is `success`. |
146+
| `steps.<step id>.outputs.<output name>` | `string` | The value of a specific output. |
147147

148148
#### **`runner` context**
149149

@@ -162,9 +162,9 @@ The `needs` context contains outputs from all jobs that are defined as a depende
162162
| Property name | Type | Description |
163163
|---------------|------|-------------|
164164
| `needs.<job id>` | `object` | A single job that the current job depends on. |
165-
| `needs.<job id>.result` | `string` | The result of a job that the current job depends on. Possible values are `success`, `failure`, or `cancelled`. |
166165
| `needs.<job id>.outputs` | `object` | The set of outputs of a job that the current job depends on. |
167166
| `needs.<job id>.outputs.<output name>` | `string` | The value of a specific output for a job that the current job depends on. |
167+
| `needs.<job id>.result` | `string` | The result of a job that the current job depends on. Possible values are `success`, `failure`, or `cancelled`. |
168168

169169
#### Example printing context information to the log file
170170

tests/unit/actions-workflows.js

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -19,17 +19,23 @@ function actionsUsedInWorkflow (workflow) {
1919
.map(key => get(workflow, key))
2020
}
2121

22+
const allUsedActions = chain(workflows)
23+
.map(actionsUsedInWorkflow)
24+
.flatten()
25+
.uniq()
26+
.sort()
27+
.value()
28+
2229
describe('GitHub Actions workflows', () => {
23-
test('only use allowed actions from ./github/allow-actions.json', async () => {
24-
const allUsedActions = chain(workflows)
25-
.map(actionsUsedInWorkflow)
26-
.flatten()
27-
.uniq()
28-
.sort()
29-
.value()
30+
test('all used actions are allowed in .github/allowed-actions.js', () => {
31+
expect(allUsedActions.length).toBeGreaterThan(0)
32+
const unusedActions = difference(allowedActions, allUsedActions)
33+
expect(unusedActions).toEqual([])
34+
})
3035

36+
test('all allowed actions by .github/allowed-actions.js are used by at least one workflow', () => {
3137
expect(allowedActions.length).toBeGreaterThan(0)
32-
expect(allUsedActions.length).toBeGreaterThan(0)
33-
expect(difference(allowedActions, allUsedActions)).toEqual([])
38+
const disallowedActions = difference(allUsedActions, allowedActions)
39+
expect(disallowedActions).toEqual([])
3440
})
3541
})

0 commit comments

Comments
 (0)