From db576685b9bf7141b7de204b51f480ce8f26fd3e Mon Sep 17 00:00:00 2001 From: Andrew Klotz Date: Mon, 14 Sep 2026 11:17:45 -0700 Subject: [PATCH] Include LFS support for submodules on persistant workers --- dist/index.js | 5 +++++ src/git-source-provider.ts | 9 +++++++++ 2 files changed, 14 insertions(+) diff --git a/dist/index.js b/dist/index.js index d166287..76a1a1b 100644 --- a/dist/index.js +++ b/dist/index.js @@ -41899,6 +41899,11 @@ async function getSource(settings) { await git.submoduleUpdate(settings.fetchDepth, settings.nestedSubmodules); await git.submoduleForeach('git config --local gc.auto 0', settings.nestedSubmodules); endGroup(); + if (settings.lfs) { + startGroup('Checking out submodule LFS objects'); + await git.submoduleForeach('git lfs checkout', settings.nestedSubmodules); + endGroup(); + } // Persist credentials if (settings.persistCredentials) { startGroup('Persisting credentials for submodules'); diff --git a/src/git-source-provider.ts b/src/git-source-provider.ts index 36f7f06..59c223d 100644 --- a/src/git-source-provider.ts +++ b/src/git-source-provider.ts @@ -294,6 +294,15 @@ export async function getSource(settings: IGitSourceSettings): Promise { ) core.endGroup() + if (settings.lfs) { + core.startGroup('Checking out submodule LFS objects') + await git.submoduleForeach( + 'git lfs checkout', + settings.nestedSubmodules + ) + core.endGroup() + } + // Persist credentials if (settings.persistCredentials) { core.startGroup('Persisting credentials for submodules')