You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/actions/learn-github-actions/contexts.md
+12-12Lines changed: 12 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -425,11 +425,11 @@ This example `jobs` context contains the result and outputs of a job from a reus
425
425
426
426
```json
427
427
{
428
-
example_job: {
429
-
result: success,
430
-
outputs: {
431
-
output1: hello,
432
-
output2: world
428
+
"example_job": {
429
+
"result": "success",
430
+
"outputs": {
431
+
"output1": "hello",
432
+
"output2": "world"
433
433
}
434
434
}
435
435
}
@@ -488,7 +488,7 @@ The `steps` context contains information about the steps in the current job that
488
488
489
489
This example `steps` context shows two previous steps that had an [`id`](/actions/learn-github-actions/workflow-syntax-for-github-actions#jobsjob_idstepsid) specified. The first step had the `id` named `checkout`, the second `generate_number`. The `generate_number` step had an output named `random_number`.
490
490
491
-
```yaml
491
+
```json
492
492
{
493
493
"checkout": {
494
494
"outputs": {},
@@ -549,7 +549,7 @@ The `runner.workspace` property is purposefully not documented. It is an early A
549
549
550
550
The following example context is from a Linux {% data variables.product.prodname_dotcom %}-hosted runner.
551
551
552
-
```yaml
552
+
```json
553
553
{
554
554
"os": "Linux",
555
555
"arch": "X64",
@@ -606,7 +606,7 @@ The `secrets` context contains the names and values of secrets that are availabl
606
606
607
607
The following example contents of the `secrets` context shows the automatic `GITHUB_TOKEN`, as well as two other secrets available to the workflow run.
608
608
609
-
```yaml
609
+
```json
610
610
{
611
611
"github_token": "***",
612
612
"NPM_TOKEN": "***",
@@ -634,7 +634,7 @@ For workflows with a matrix, the `strategy` context contains information about t
634
634
635
635
The following example contents of the `strategy` context is from a matrix with four jobs, and is taken from the final job. Note the difference between the zero-based `job-index` number, and `job-total` which is not zero-based.
636
636
637
-
```yaml
637
+
```json
638
638
{
639
639
"fail-fast": true,
640
640
"job-index": 3,
@@ -683,7 +683,7 @@ There are no standard properties in the `matrix` context, only those which are d
683
683
684
684
The following example contents of the `matrix` context is from a job in a matrix that has the `os` and `node` matrix properties defined in the workflow. The job is executing the matrix combination of an `ubuntu-latest` OS and Node.js version `16`.
685
685
686
-
```yaml
686
+
```json
687
687
{
688
688
"os": "ubuntu-latest",
689
689
"node": 16
@@ -732,7 +732,7 @@ The `needs` context contains outputs from all jobs that are defined as a depende
732
732
733
733
The following example contents of the `needs` context shows information for two jobs that the current job depends on.
734
734
735
-
```yaml
735
+
```json
736
736
{
737
737
"build": {
738
738
"result": "success",
@@ -800,7 +800,7 @@ There are no standard properties in the `inputs` context, only those which are d
800
800
801
801
The following example contents of the `inputs` context is from a workflow that has defined the `build_id`, `deploy_target`, and `perform_deploy` inputs.
0 commit comments