1
0
Fork 0
mirror of https://github.com/actions/checkout.git synced 2024-11-23 09:17:17 +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:
Johnny Willemsen 2020-08-26 12:09:04 +02:00
parent be6c44d969
commit 146dd77449
No known key found for this signature in database
GPG key ID: CCE55DD593057AD0
3 changed files with 16 additions and 4 deletions

View file

@ -82,7 +82,7 @@ Refer [here](https://github.com/actions/checkout/blob/v1/README.md) for previous
# Default: true # Default: true
persist-credentials: '' persist-credentials: ''
# Relative path under $GITHUB_WORKSPACE to place the repository # Relative or absolute path under $GITHUB_WORKSPACE to place the repository
path: '' path: ''
# Whether to execute `git clean -ffdx && git reset --hard HEAD` before fetching # 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 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) ## Checkout multiple repos (nested)
```yaml ```yaml

View file

@ -49,7 +49,7 @@ inputs:
description: 'Whether to configure the token or SSH key with the local git config' description: 'Whether to configure the token or SSH key with the local git config'
default: true default: true
path: path:
description: 'Relative path under $GITHUB_WORKSPACE to place the repository' description: 'Relative or absolute path under $GITHUB_WORKSPACE to place the repository'
clean: clean:
description: 'Whether to execute `git clean -ffdx && git reset --hard HEAD` before fetching' description: 'Whether to execute `git clean -ffdx && git reset --hard HEAD` before fetching'
default: true default: true

View file

@ -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' description: 'Whether to configure the token or SSH key with the local git config'
default: true default: true
path: path:
description: 'Relative path under $GITHUB_WORKSPACE to place the repository' description: 'Relative or absolute path under $GITHUB_WORKSPACE to place the repository'
clean: clean:
description: 'Whether to execute `git clean -ffdx && git reset --hard HEAD` before fetching' description: 'Whether to execute `git clean -ffdx && git reset --hard HEAD` before fetching'
default: true default: true