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