-
Notifications
You must be signed in to change notification settings - Fork 0
55 lines (50 loc) · 1.22 KB
/
complex.yml
File metadata and controls
55 lines (50 loc) · 1.22 KB
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
on:
merge_group:
push:
branches: ["main", "dev"]
pull_request:
branches: ["main", "dev", "*"]
workflow_dispatch:
jobs:
first:
if: ${{ github.event_name == 'merge_group' }}
runs-on: ubuntu-latest
steps:
- name: Report
run: echo "Step 1"
second:
if: ${{ github.event_name == 'merge_group' }}
needs: [first]
runs-on: ubuntu-latest
steps:
- name: Report
run: echo "Step 2"
third:
if: ${{ github.event_name == 'merge_group' }}
needs: [second]
runs-on: ubuntu-latest
steps:
- name: Report
run: echo "Step 3"
second-status:
if: ${{ always() }}
needs: [first, second]
runs-on: ubuntu-latest
steps:
- name: Successful
if: ${{ !(contains(needs.*.result, 'failure')) }}
run: exit 0
- name: Failing
if: ${{ (contains(needs.*.result, 'failure')) }}
run: exit 1
complex-status:
if: ${{ always() }}
needs: [first, second, third]
runs-on: ubuntu-latest
steps:
- name: Successful
if: ${{ !(contains(needs.*.result, 'failure')) }}
run: exit 0
- name: Failing
if: ${{ (contains(needs.*.result, 'failure')) }}
run: exit 1