forked from tianocore/edk2
-
Notifications
You must be signed in to change notification settings - Fork 4
37 lines (34 loc) · 1.31 KB
/
patchcheckonlabelchange.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
## @file
# Run PatchCheck on a label change in a pull request
#
# Copyright (c) 2024, Intel Corporation. All rights reserved.<BR>
# SPDX-License-Identifier: BSD-2-Clause-Patent
##
name: PatchCheckOnLabelChange
on:
pull_request:
types: [labeled, unlabeled]
branches:
- CiEnabled
jobs:
patchcheck:
if: ${{ (github.event.pull_request.draft == false) && (github.event.label.name == 'ignore-multi-package') }}
runs-on: ubuntu-latest
steps:
- name: Install Python
uses: actions/setup-python@v5
with:
python-version: '3.x'
- name: Checkout PR
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: 0
- name: Install Python Dependencies
run: pip install -r pip-requirements.txt
- name: PatchCheck
if: ${{ !contains(github.event.pull_request.labels.*.name, 'ignore-multi-package') }}
run: python BaseTools/Scripts/PatchCheck.py ${{ github.event.pull_request.base.sha }}..
- name: PatchCheck --ignore-multi-package
if: ${{ contains(github.event.pull_request.labels.*.name, 'ignore-multi-package') }}
run: python BaseTools/Scripts/PatchCheck.py --ignore-multi-package ${{ github.event.pull_request.base.sha }}..