mirror of
https://code.forgejo.org/actions/checkout
synced 2024-11-24 10:00:39 +00:00
The path can be relative or absolute under $GITHUB_WORKSPACE
* README.md: * action.yml: * adrs/0153-checkout-v2.md:
This commit is contained in:
parent
be6c44d969
commit
146dd77449
3 changed files with 16 additions and 4 deletions
14
README.md
14
README.md
|
@ -82,7 +82,7 @@ Refer [here](https://github.com/actions/checkout/blob/v1/README.md) for previous
|
|||
# Default: true
|
||||
persist-credentials: ''
|
||||
|
||||
# Relative path under $GITHUB_WORKSPACE to place the repository
|
||||
# Relative or absolute path under $GITHUB_WORKSPACE to place the repository
|
||||
path: ''
|
||||
|
||||
# Whether to execute `git clean -ffdx && git reset --hard HEAD` before fetching
|
||||
|
@ -160,6 +160,18 @@ Refer [here](https://github.com/actions/checkout/blob/v1/README.md) for previous
|
|||
path: my-tools
|
||||
```
|
||||
|
||||
## Checkout repo with a environment based path (side by side)
|
||||
|
||||
```yaml
|
||||
env:
|
||||
main_path: ${{ github.workspace }}/main
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
path: ${{ env.main_path }}
|
||||
```
|
||||
|
||||
## Checkout multiple repos (nested)
|
||||
|
||||
```yaml
|
||||
|
|
|
@ -49,7 +49,7 @@ inputs:
|
|||
description: 'Whether to configure the token or SSH key with the local git config'
|
||||
default: true
|
||||
path:
|
||||
description: 'Relative path under $GITHUB_WORKSPACE to place the repository'
|
||||
description: 'Relative or absolute path under $GITHUB_WORKSPACE to place the repository'
|
||||
clean:
|
||||
description: 'Whether to execute `git clean -ffdx && git reset --hard HEAD` before fetching'
|
||||
default: true
|
||||
|
|
|
@ -65,7 +65,7 @@ We want to take this opportunity to make behavioral changes, from v1. This docum
|
|||
description: 'Whether to configure the token or SSH key with the local git config'
|
||||
default: true
|
||||
path:
|
||||
description: 'Relative path under $GITHUB_WORKSPACE to place the repository'
|
||||
description: 'Relative or absolute path under $GITHUB_WORKSPACE to place the repository'
|
||||
clean:
|
||||
description: 'Whether to execute `git clean -ffdx && git reset --hard HEAD` before fetching'
|
||||
default: true
|
||||
|
|
Loading…
Reference in a new issue