From dccf1ad44ce3d0284498d1c71bbb553005f7a1bc Mon Sep 17 00:00:00 2001 From: ange Date: Sun, 2 Feb 2025 00:50:42 +0000 Subject: [PATCH] feat: copy content of sparse --- entrypoint.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/entrypoint.sh b/entrypoint.sh index 4ac82bb..46737d4 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -8,7 +8,8 @@ git fetch --no-tags --prune --no-recurse-submodules --depth=1 origin "$GITHUB_SH git checkout --progress --force -B main "$GITHUB_SHA" if [ -n "$INPUT_SUBPATH" ]; then ( - shopt -s extglob dotglob - rm !("$INPUT_SUBPATH") - mv -T "$INPUT_SUBPATH" . + shopt -s dotglob + git sparse-checkout set "$INPUT_SUBPATH" + mv "$INPUT_SUBPATH"/* . + rmdir "$INPUT_SUBPATH" ) fi