.github: avoid full checkout on backport

The backport action should work with a sparse tree, so materializing all
files is just wasteful.

Since total time allocated for backport jobs is just 3 mins, sometimes a
slow worktree checkout consumes a good chunk of it and pushes the job to
timeout, resulting in missed backport. See for example:

https://github.com/NixOS/nixpkgs/actions/runs/30587897004/job/91023481883
(cherry picked from commit 830255b283)
This commit is contained in:
Ihar Hrachyshka
2026-07-30 19:52:12 -04:00
committed by github-actions[bot]
parent 96adf676da
commit c8187c1719

View File

@@ -39,6 +39,8 @@ jobs:
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
with:
ref: ${{ github.event.pull_request.head.sha }}
# Avoid materializing full nixpkgs tree
sparse-checkout: .
token: ${{ steps.app-token.outputs.token }}
persist-credentials: true