fix: SUBPATH
This commit is contained in:
parent
a1be1fd562
commit
40ff2b96ce
@ -7,7 +7,6 @@ inputs:
|
||||
default: ${{ gitea.token }}
|
||||
subpath:
|
||||
description: Limit clone to a single directory inside the repo
|
||||
default: .
|
||||
|
||||
runs:
|
||||
using: composite
|
||||
|
@ -7,6 +7,8 @@ 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"
|
||||
|
||||
mv "$INPUT_SUBPATH" /bak/
|
||||
find . -delete
|
||||
mv /bak/ .
|
||||
if [ -n "$INPUT_SUBPATH" ]; then (
|
||||
shopt -s extglob dotglob
|
||||
rm !("$INPUT_SUBPATH")
|
||||
mv -T "$INPUT_SUBPATH" .
|
||||
) fi
|
||||
|
Loading…
Reference in New Issue
Block a user