3
0
Fork 0
mirror of https://github.com/actions/checkout.git synced 2024-11-25 20:39:32 +01: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
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

View file

@ -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

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'
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
@ -287,4 +287,4 @@ Note:
- Update samples to consume `actions/checkout@v2`
- Job containers now require git in the PATH for checkout, otherwise fallback to REST API
- Minimum git version 2.18
- Update problem matcher logic regarding source file verification (runner)
- Update problem matcher logic regarding source file verification (runner)