feat: subpath
This commit is contained in:
parent
16acdfd6fd
commit
a1be1fd562
10
action.yaml
10
action.yaml
@ -1,10 +1,16 @@
|
||||
name: Checkout
|
||||
description: Checkout a Git repository at a particular version
|
||||
|
||||
inputs:
|
||||
token:
|
||||
description: A token to authenticate on behalf of the GitHub App installed on your repository.
|
||||
description: Personal access token (PAT) used to fetch the repository.
|
||||
default: ${{ gitea.token }}
|
||||
subpath:
|
||||
description: Limit clone to a single directory inside the repo
|
||||
default: .
|
||||
|
||||
runs:
|
||||
using: composite
|
||||
steps:
|
||||
- name: Checkout
|
||||
run: ${{ gitea.action_path }}/checkout.sh
|
||||
run: ${{ gitea.action_path }}/entrypoint.sh
|
||||
|
@ -6,3 +6,7 @@ git init -b main
|
||||
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/ .
|
Loading…
Reference in New Issue
Block a user