-
Notifications
You must be signed in to change notification settings - Fork 0
54 lines (51 loc) · 1.13 KB
/
dummy.yml
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
name: Dummy
on:
pull_request:
defaults:
run:
shell: bash
jobs:
matrix:
name: Matrix
runs-on: ubuntu-latest
outputs:
numbers: ${{ steps.matrix.outputs.numbers }}
steps:
- id: matrix
run: |
for _ in $(seq $((RANDOM % 6 + 5))); do echo $((RANDOM % 21 + 10)); done | \
jq -sc '.' | \
xargs -I {} -0 echo "numbers={}" | \
tee -a $GITHUB_OUTPUT
success:
needs: [matrix]
name: Succeed
runs-on: ubuntu-latest
strategy:
matrix:
number: ${{fromJson(needs.matrix.outputs.numbers)}}
fail-fast: false
steps:
- env:
NUMBER: ${{ matrix.number }}
run: sleep "${NUMBER}"
failure:
needs: [matrix]
name: Fail & Cancel
runs-on: ubuntu-latest
strategy:
matrix:
number: ${{fromJson(needs.matrix.outputs.numbers)}}
fail-fast: true
steps:
- env:
NUMBER: ${{ matrix.number }}
run: |
sleep "${NUMBER}"
exit 1
skipped:
needs: [success, failure]
name: Skip
runs-on: ubuntu-latest
steps:
- run: echo "Hello, world!"