Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions content/actions/reference/workflows-and-actions/contexts.md
Original file line number Diff line number Diff line change
Expand Up @@ -730,6 +730,8 @@ There are no standard properties in the `matrix` context, only those which are d
| `matrix` | `object` | This context is only available for jobs in a matrix, and changes for each job in a workflow run. You can access this context from any job or step in a workflow. This object contains the properties listed below. |
| `matrix.<property_name>` | `string` | The value of a matrix property. |

{% data reusables.actions.workflows.matrix-keys-are-case-insensitive %}

### Example contents of the `matrix` context

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`.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1242,6 +1242,8 @@ A matrix will generate a maximum of 256 jobs per workflow run. This limit applie

The variables that you define become properties in the `matrix` context, and you can reference the property in other areas of your workflow file. In this example, you can use `matrix.version` and `matrix.os` to access the current value of `version` and `os` that the job is using. For more information, see [AUTOTITLE](/actions/reference/workflows-and-actions/contexts).

{% data reusables.actions.workflows.matrix-keys-are-case-insensitive %}

By default, {% data variables.product.github %} will maximize the number of jobs run in parallel depending on runner availability. The order of the variables in the matrix determines the order in which the jobs are created. The first variable you define will be the first job that is created in your workflow run.

### Using a single-dimension matrix
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
> [!NOTE]
> The variable names are case insensitive. For example, `OS` and `os` will be treated as the same variable.
Loading