.github/request-reviews.yml: Use sparse checkout

Optimizes the repository checkout step from an average time of 21
to 1 second by performing a sparse checkout of only the file paths
needed for the workflow run at a fetch depth of 1.

Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
This commit is contained in:
Michael Kubacki 2024-07-31 18:18:23 -04:00 committed by mergify[bot]
parent 5d43165ff8
commit 38c4cd4e88
1 changed files with 9 additions and 1 deletions

View File

@ -32,10 +32,18 @@ jobs:
pull-requests: write
steps:
# Reduce checkout time with sparse-checkout
# - .github: Contains the scripts to interact with Github and add reviewers
# - BaseTools/Scripts: Contains the GetMaintainer.py script
# - Maintainers.txt: Contains the list of maintainers for the repository
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
fetch-depth: 1
sparse-checkout: |
.github
BaseTools/Scripts
Maintainers.txt
- name: Set up Python
uses: actions/setup-python@v5