Description
Clones a Git repository to create a local copy for development or modification.
Input Schema
| Property | Type | Description | Required |
|---|---|---|---|
| args | array | - | |
| repoUrl | string | The repository to clone |
Output Schema
No output schema defined for this action.
Usage Examples
Clone a specific branch with shallow history into a subdirectory
Clone a repository branch with a shallow history and place it under a nested path in the workspace. Use this after fetch:template to pull in service source code.
steps:
- id: fetch-skeleton
action: fetch:template
input:
url: ./skeleton
targetPath: .
values:
name: ${{ parameters.name }}
- id: clone-service
action: git:clone
input:
repoUrl: ${{ parameters.sourceRepoUrl }}
args:
- --branch
- ${{ parameters.branch }}
- --depth
- '1'
- --single-branch
- services/apiClone an SSH repo with submodules at a tagged release
Clone an SSH repository with submodules initialized and checked out at a specific tag. Use this to vendor third party modules into a local directory.
steps:
- id: clone-vendor-modules
action: git:clone
input:
repoUrl: [email protected]:acme/terraform-modules.git
args:
- --recurse-submodules
- --shallow-submodules
- --branch
- ${{ parameters.tag }}
- vendor/terraform-modules
- id: fetch-app
action: fetch:template
input:
url: ./app
targetPath: .
values:
appId: ${{ parameters.appId }}