-
Notifications
You must be signed in to change notification settings - Fork 1
58 lines (47 loc) · 1.12 KB
/
matrix.yaml
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
name: matrix if
on:
push:
branches: []
jobs:
changes:
runs-on: ubuntu-latest
outputs:
o1: true
o2: 'true'
o3: false
o4: 'false'
steps:
- shell: bash
run: echo bash
matrix_job:
strategy:
fail-fast: false
matrix:
include:
- name: o1
if-string: ${{ needs.changes.outputs.o1 }} == true
- name: o2
if-string: ${{ needs.changes.outputs.o2 }} == true
- name: o3
if-string: ${{ needs.changes.outputs.o3 }} == true
- name: o4
if-string: ${{ needs.changes.outputs.o4 }} == true
name: ${{ matrix.name }}
runs-on: ubuntu-latest
needs: changes
steps:
- shell: bash
if: needs.changes.outputs[matrix.name] == 'true'
run: echo ${{ needs.changes.outputs[matrix.name] }}
job1:
runs-on: ubuntu-latest
steps:
- shell: bash
if: false
run: echo job1
job2:
runs-on: ubuntu-latest
steps:
- shell: bash
if: true
run: echo job2