Skip to content

Commit

Permalink
Merge pull request #49703 from github/repo-sync
Browse files Browse the repository at this point in the history
Repo sync
  • Loading branch information
docs-bot authored Mar 14, 2024
2 parents ccbe824 + eb02005 commit 0bf017d
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions data/reusables/actions/jobs/multi-dimension-matrix.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,31 @@ jobs:
with:
node-version: {% raw %}${{ matrix.version }}{% endraw %}
```
A variable configuration in a matrix can be an `array` of `object`s.

```yaml
matrix:
os:
- ubuntu-latest
- macos-latest
node:
- version: 14
- version: {% ifversion actions-node20-support %}20{% else %}16{% endif %}
env: NODE_OPTIONS=--openssl-legacy-provider
```

This matrix produces 4 jobs with corresponding contexts.

```yaml
- matrix.os: ubuntu-latest
matrix.node.version: 14
- matrix.os: ubuntu-latest
matrix.node.version: {% ifversion actions-node20-support %}20{% else %}16{% endif %}
matrix.node.env: NODE_OPTIONS=--openssl-legacy-provider
- matrix.os: macos-latest
matrix.node.version: 14
- matrix.os: macos-latest
matrix.node.version: {% ifversion actions-node20-support %}20{% else %}16{% endif %}
matrix.node.env: NODE_OPTIONS=--openssl-legacy-provider
```

0 comments on commit 0bf017d

Please sign in to comment.