-
Notifications
You must be signed in to change notification settings - Fork 752
83 lines (77 loc) · 2.13 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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
name: "Merge Group"
on:
merge_group:
jobs:
title:
runs-on: ubuntu-latest
steps:
- name: Skip title check
shell: bash
run: exit 0
cla:
runs-on: ubuntu-latest
steps:
- name: Skip CLA check
shell: bash
run: exit 0
changes:
runs-on: ubuntu-latest
outputs:
any_src_changed: ${{ steps.src.outputs.any_changed }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Check Source File Changes
uses: tj-actions/changed-files@v45
id: src
with:
files_ignore: |
.github/**
**.md
benchmark/**
docker/**
scripts/setup/**
.devcontainer/**
- name: Output Source File Changes
run: |
if [[ "${{ steps.src.outputs.any_changed }}" == "true" ]]; then
echo "these src files changed:" >> $GITHUB_STEP_SUMMARY
for line in ${{ steps.src.outputs.all_changed_files }}; do
echo "- $line" >> $GITHUB_STEP_SUMMARY
done
else
echo "no src file changes detected" >> $GITHUB_STEP_SUMMARY
fi
linux:
needs: changes
if: needs.changes.outputs.any_src_changed == 'true'
uses: ./.github/workflows/reuse.linux.yml
secrets: inherit
with:
build_profile: ci
runner_provider: aws
license_type: enterprise
ready:
if: always()
runs-on: ubuntu-latest
needs:
- changes
- linux
steps:
- name: Check Ready to Merge
uses: actions/github-script@v7
env:
SRC_CHANGED: ${{ needs.changes.outputs.any_src_changed }}
LINUX_BUILD_RESULT: ${{ needs.linux.result }}
with:
script: |
if (process.env.SRC_CHANGED == 'false') {
core.info('No source file changes detected, skipping');
return;
}
if (process.env.LINUX_BUILD_RESULT == 'success') {
core.info('Linux build succeeded, ready to merge');
return;
}
core.setFailed('Build failed, not ready to merge');