1
0
mirror of synced 2026-01-02 03:04:13 -05:00
Files
docs/translations/ru-RU/data/reusables/github-actions/matrix-variable-example.md
Chiedo John 1e6714192b Crowdin translations (translation-batch-1606831598) (#16683)
* New Crowdin translations by Github Action

* Reset translations with known issues to english

* Revert broken translations

* Reset broken translated file

* Revert broken translations

Co-authored-by: Crowdin Bot <support+bot@crowdin.com>
Co-authored-by: Chiedo <chiedo@users.noreply.github.com>
2020-12-01 15:15:47 +00:00

27 lines
768 B
Markdown

In this example, the matrix entries for `node-version` are each configured to use different values for the `site` and `datacenter` environment variables. The `Echo site details` step then uses {% raw %}`env: ${{ matrix.env }}`{% endraw %} to refer to the custom variables:
{% raw %}
```yaml
name: Node.js CI
on: [push]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
include:
- node-version: 10.x
site: "prod"
datacenter: "site-a"
- node-version: 12.x
site: "dev"
datacenter: "site-b"
steps:
- name: Echo site details
env:
SITE: ${{ matrix.site }}
DATACENTER: ${{ matrix.datacenter }}
run: echo $SITE $DATACENTER
```
{% endraw %}