From 38c4cd4e88adf6d5d5c4bf753dafba7f24f019d0 Mon Sep 17 00:00:00 2001 From: Michael Kubacki Date: Wed, 31 Jul 2024 18:18:23 -0400 Subject: .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 --- .github/workflows/request-reviews.yml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/.github/workflows/request-reviews.yml b/.github/workflows/request-reviews.yml index 3311e1165d..a9b81c37d2 100644 --- a/.github/workflows/request-reviews.yml +++ b/.github/workflows/request-reviews.yml @@ -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 -- cgit