From bd80c7d455e488c7c7b8098322808caf676e8fe0 Mon Sep 17 00:00:00 2001 From: Jasperhino Date: Fri, 24 Apr 2026 11:08:59 +0200 Subject: [PATCH] checkout: add sparse-checkout-cone-mode passthrough MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Required when sparse-checkout patterns include files (not just dirs) — lint-github-docs uses cone-mode=false to pin package.json, pnpm-lock.yaml etc. Without the passthrough actions/checkout treats files as dirs. --- checkout/action.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/checkout/action.yml b/checkout/action.yml index 1871050..a2911e6 100644 --- a/checkout/action.yml +++ b/checkout/action.yml @@ -13,6 +13,10 @@ inputs: description: 'Newline-separated sparse-checkout patterns. When set, the GCS cache is bypassed entirely and the step is a plain actions/checkout — avoids polluting the full-tree cache with sparse trees.' required: false default: '' + sparse-checkout-cone-mode: + description: 'Whether sparse-checkout patterns are cone-mode (true) or full patterns (false). Required as "false" when patterns include files, not just directories.' + required: false + default: 'true' ref: description: 'Branch, tag or SHA to check out on cache miss. Defaults to the workflow ref.' required: false @@ -49,6 +53,7 @@ runs: fetch-depth: ${{ inputs.fetch-depth }} filter: ${{ inputs.filter }} sparse-checkout: ${{ inputs.sparse-checkout }} + sparse-checkout-cone-mode: ${{ inputs.sparse-checkout-cone-mode }} ref: ${{ inputs.ref }} - name: Strip credentials before caching