3
0
Fork 0
mirror of https://code.forgejo.org/actions/cache.git synced 2026-08-08 12:31:14 +00:00

checkout: add sparse-checkout-cone-mode passthrough

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.
This commit is contained in:
Jasperhino 2026-04-24 11:08:59 +02:00
parent 94243edc16
commit bd80c7d455

View file

@ -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