1
0
mirror of synced 2026-02-03 00:02:00 -05:00
Files
docs/translations/ru-RU/data/reusables/actions/matrix-variable-example.md
2022-11-16 21:42:42 +00:00

35 lines
1.1 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
---
ms.openlocfilehash: 0e843d106ae2cdac0dbc2fc37baec5d035b6a3c2
ms.sourcegitcommit: fcf3546b7cc208155fb8acdf68b81be28afc3d2d
ms.translationtype: HT
ms.contentlocale: ru-RU
ms.lasthandoff: 09/10/2022
ms.locfileid: "145114168"
---
В этом примере записи матрицы для `node-version` каждая из них настроена для использования различных значений для переменных среды `site` и `datacenter`. Затем шаг `Echo site details` использует {% raw %}`env: ${{ matrix.env }}`{% endraw %} для ссылки на пользовательские переменные:
{% 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 %}