feat: submodules

This commit is contained in:
ange 2025-10-22 12:41:55 +00:00
parent 52e7590325
commit bf3f4b11e1
Signed by: ange
GPG key ID: 9E0C4157BB7BEB1D
2 changed files with 9 additions and 1 deletions

View file

@ -7,6 +7,12 @@ git remote add origin "$URL"
git fetch --no-tags --prune --no-recurse-submodules --depth=1 origin "$GITHUB_SHA"
git checkout --progress --force -B main "$GITHUB_SHA"
if [ "$INPUT_SUBMODULES" = true ]; then
git submodule update --init --single-branch
elif [ "$INPUT_SUBMODULES" = recursive ]; then
git submodule update --init --single-branch --recursive
fi
if [ -n "$INPUT_SUBPATH" ]; then (
shopt -s dotglob
git sparse-checkout set "$INPUT_SUBPATH"