From 3c5e01cba582c759a947ad5a70b1b4f00830c972 Mon Sep 17 00:00:00 2001 From: Jeffy Mathew Date: Tue, 14 Oct 2025 18:05:30 +0200 Subject: [PATCH 1/3] Add sparse checkout option --- .github/actions/checkout-pr/action.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/actions/checkout-pr/action.yml b/.github/actions/checkout-pr/action.yml index bc22a26c..d40ac8b2 100644 --- a/.github/actions/checkout-pr/action.yml +++ b/.github/actions/checkout-pr/action.yml @@ -10,6 +10,9 @@ inputs: default: ${{ github.job }} token: description: 'A Github PAT' + sparse-checkout: + description: 'Do a sparse checkout on given patterns. Each pattern should be separated with new lines.' + required: false runs: using: "composite" @@ -26,6 +29,7 @@ runs: fetch-depth: ${{ env.PR_FETCH_DEPTH }} submodules: true lfs: true + sparse-checkout: ${{ inputs.sparse-checkout }} - name: 'Fetch the other branch with enough history for a common merge-base commit' shell: bash From 0afd7f898ad29d72f29cdd6d8dab5a19df4e9bfb Mon Sep 17 00:00:00 2001 From: Jeffy Mathew Date: Wed, 15 Oct 2025 09:41:35 +0200 Subject: [PATCH 2/3] clone with filter --- .github/actions/checkout-pr/action.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/actions/checkout-pr/action.yml b/.github/actions/checkout-pr/action.yml index d40ac8b2..0b10ebf0 100644 --- a/.github/actions/checkout-pr/action.yml +++ b/.github/actions/checkout-pr/action.yml @@ -13,6 +13,9 @@ inputs: sparse-checkout: description: 'Do a sparse checkout on given patterns. Each pattern should be separated with new lines.' required: false + filter: + description: 'Partially clone against a given filter. Overrides sparse-checkout if set' + required: false runs: using: "composite" @@ -30,6 +33,7 @@ runs: submodules: true lfs: true sparse-checkout: ${{ inputs.sparse-checkout }} + filter: ${{ inputs.filter }} - name: 'Fetch the other branch with enough history for a common merge-base commit' shell: bash From 411864b38994c90fab7e8b185ff617497d5688ab Mon Sep 17 00:00:00 2001 From: Jeffy Mathew Date: Wed, 15 Oct 2025 10:17:15 +0200 Subject: [PATCH 3/3] parametrise lfs --- .github/actions/checkout-pr/action.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/actions/checkout-pr/action.yml b/.github/actions/checkout-pr/action.yml index 0b10ebf0..a9fbdabb 100644 --- a/.github/actions/checkout-pr/action.yml +++ b/.github/actions/checkout-pr/action.yml @@ -16,6 +16,10 @@ inputs: filter: description: 'Partially clone against a given filter. Overrides sparse-checkout if set' required: false + lfs: + description: 'Whether to download Git-LFS files' + required: false + default: 'true' runs: using: "composite" @@ -31,7 +35,7 @@ runs: token: ${{ inputs.token }} fetch-depth: ${{ env.PR_FETCH_DEPTH }} submodules: true - lfs: true + lfs: ${{ inputs.lfs }} sparse-checkout: ${{ inputs.sparse-checkout }} filter: ${{ inputs.filter }}