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