Skip to content

Commit

Permalink
.guthub: Add PatchCheckOnLabelChange
Browse files Browse the repository at this point in the history
Signed-off-by: Michael D Kinney <[email protected]>
  • Loading branch information
mdkinney committed Feb 16, 2024
1 parent e9c4066 commit cab30f5
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/patchcheck.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ name: PatchCheck

on:
pull_request:
types: [opened, synchronize, reopened, ready_for_review, labeled, unlabeled]
types: [opened, synchronize, reopened, ready_for_review]
branches:
- CiEnabled

Expand Down
37 changes: 37 additions & 0 deletions .github/workflows/patchcheckonlabelchange.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,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 }}..

0 comments on commit cab30f5

Please sign in to comment.