Skip to content

MdePkg: Add comment #110

MdePkg: Add comment

MdePkg: Add comment #110

Workflow file for this run

## @file
# Run PatchCheck on all commits in a pull request
#
# Copyright (c) 2024, Intel Corporation. All rights reserved.<BR>
# SPDX-License-Identifier: BSD-2-Clause-Patent
##
name: PatchCheck
on:
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
branches:
- CommitMessageCiFilter
jobs:
patchcheck:
name: Patch Check
if: github.event.pull_request.draft == false
runs-on: ubuntu-latest
steps:
- name: Fetch Depth
run: echo "FetchDepth=$((${{ github.event.pull_request.commits }} + 1))" >> $GITHUB_ENV
- name: Fetch PR
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: ${{ env.FetchDepth }}
sparse-checkout: |
pip-requirements.txt
BaseTools/Scripts/PatchCheck.py
- name: Checkout Base
run: git checkout ${{ github.event.pull_request.base.sha }}
- name: Install Python
uses: actions/setup-python@v5
with:
python-version: '3.x'
- name: Cache Python Dependencies
id: cache-python-dependencies
uses: actions/cache@v4
with:
path: ${{ env.pythonLocation }}
key: ${{ env.pythonLocation }}-${{ hashFiles('pip-requirements.txt') }}
- name: Install Python Dependencies
if: ${{ steps.cache-python-dependencies.outputs.cache-hit != 'true'}}
run: pip install -r pip-requirements.txt
- name: PatchCheck
run: python BaseTools/Scripts/PatchCheck.py ${{ github.event.pull_request.head.sha }}~${{ github.event.pull_request.commits }}..${{ github.event.pull_request.head.sha }}