-
Notifications
You must be signed in to change notification settings - Fork 0
36 lines (30 loc) · 1010 Bytes
/
matrix_array.yml
File metadata and controls
36 lines (30 loc) · 1010 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
name: "matrix_array"
on:
workflow_dispatch:
inputs:
target:
description: "sample input (1 | 2 | 3)"
required: true
default: ""
jobs:
debug_array:
runs-on: "ubuntu-latest"
strategy:
fail-fast: false
matrix:
entries:
- { key: 1, value: "value1" }
- { key: 2, value: "value2" }
- { key: 2, value: "value3" }
- { key: 3, value: "value4" }
- { key: 3, value: "value5" }
- { key: 3, value: "value6" }
name: '${{ fromJSON(''["[Skipped] ", ""]'')[matrix.entries.key == github.event.inputs.target] }}${{ matrix.entries.key }} => ${{ matrix.entries.value }}'
env:
RUN: '${{ fromJSON(''["", "1"]'')[matrix.entries.key == github.event.inputs.target] }}'
steps:
# - if: "matrix.entries.key == github.event.inputs.target"
# name: "Set job as run"
# run: echo "RUN=1" >> $GITHUB_ENV
- if: "env.RUN"
run: "echo ${{ matrix.entries.value }}"