-
Notifications
You must be signed in to change notification settings - Fork 0
61 lines (46 loc) · 1.23 KB
/
merge_group.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
55
56
57
58
59
60
61
name: Merge Queue Build Check
run-name: Merge Group check - ${{ github.event.merge_group.head_commit.message }}
# check enable the merge queue
permissions: read-all
concurrency:
group: build-all-${{ github.ref }}
cancel-in-progress: true
on:
# uncomment for testing
# pull_request:
# branches: [main]
merge_group:
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Checkout Source Code
uses: actions/checkout@v4
- name: Dummy
timeout-minutes: 40
run: |
echo "Hello world, this is a dummy build"
# To satisfy the merge queue check
done:
name: Done
needs:
- build
runs-on: ubuntu-latest
if: always()
steps:
- name: Dump needs context
env:
CONTEXT: ${{ toJson(needs) }}
run: |
echo -e "\033[33;1;4mDump context\033[0m"
echo -e "$CONTEXT\n"
- name: Report failure on cancellation
if: ${{ contains(needs.*.result, 'cancelled') || cancelled() }}
run: exit 1
- name: Failing test and build
if: ${{ contains(needs.*.result, 'failure') }}
run: exit 1
- name: Successful test and build
if: ${{ !(contains(needs.*.result, 'failure')) }}
run: exit 0