Skip to content

Commit f1b176b

Browse files
author
Tyler Titsworth
authored
Add Merge Check for MG Status (#74)
1 parent 1169f49 commit f1b176b

File tree

2 files changed

+57
-0
lines changed

2 files changed

+57
-0
lines changed

.github/workflows/integration-test.yaml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,3 +73,20 @@ jobs:
7373
group_dir: ${{ matrix.group }}
7474
ref: "refs/pull/${{ github.event.number }}/merge"
7575
secrets: inherit
76+
status-check:
77+
needs: [group-diff, pipeline-ci]
78+
runs-on: ubuntu-latest
79+
if: always()
80+
steps:
81+
- name: Harden Runner
82+
uses: step-security/harden-runner@f086349bfa2bd1361f7909c78558e816508cdc10 # v2.8.0
83+
with:
84+
egress-policy: audit
85+
- run: exit 1
86+
if: >-
87+
${{
88+
contains(needs.*.result, 'failure')
89+
|| contains(needs.*.result, 'cancelled')
90+
|| contains(needs.*.result, 'skipped')
91+
&& needs.group-diff.outputs.groups != '[""]'
92+
}}

.github/workflows/merge_check.yaml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# Copyright (c) 2024 Intel Corporation
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
name: Merge Check
16+
on:
17+
merge_group: null
18+
permissions: read-all
19+
jobs:
20+
status-check:
21+
runs-on: ubuntu-latest
22+
steps:
23+
- uses: lewagon/wait-on-check-action@ccfb013c15c8afb7bf2b7c028fb74dc5a068cccc
24+
with:
25+
ref: ${{ github.event.merge_group.head_ref }}
26+
check-name: helm-ci
27+
repo-token: ${{ secrets.ACTION_TOKEN }}
28+
wait-interval: 10
29+
- uses: lewagon/wait-on-check-action@ccfb013c15c8afb7bf2b7c028fb74dc5a068cccc
30+
with:
31+
ref: ${{ github.event.merge_group.head_ref }}
32+
check-name: integration-test
33+
repo-token: ${{ secrets.ACTION_TOKEN }}
34+
wait-interval: 10
35+
- uses: lewagon/wait-on-check-action@ccfb013c15c8afb7bf2b7c028fb74dc5a068cccc
36+
with:
37+
ref: ${{ github.event.merge_group.head_ref }}
38+
check-name: coverage
39+
repo-token: ${{ secrets.ACTION_TOKEN }}
40+
wait-interval: 10

0 commit comments

Comments
 (0)