Downloads content and places it in the workspace, or optionally in a subdirectory specified by the targetPath input option.
Input Schema
| Property | Type | Description | Required |
|---|---|---|---|
| url | string | Relative path or absolute URL pointing to the directory tree to fetch | |
| token | string | An optional token to use for authentication when reading the resources. | |
| targetPath | string | Target path within the working directory to download the contents to. |
Output Schema
Usage Examples
Fetch static base files from a local folder into the workspace root
Copies non-templated base files that live next to the template into the workspace. Use this to bring in common dotfiles or shared assets before you generate code or publish with publish:github.
steps:
- id: fetch-base-files
action: fetch:plain
input:
url: ./skeletons/baseFetch documentation starter into a docs subdirectory
Downloads a docs starter from a local path and places it under docs. Useful when your template renders code separately and you want static documentation assets in a fixed location before registering with catalog:register.
steps:
- id: fetch-docs-starter
action: fetch:plain
input:
url: ./assets/docs-starter
targetPath: docsDownload and extract a remote tarball into a vendor folder
Fetches a public tarball from a remote repository and extracts it under vendor. Use this to vendor a UI kit or boilerplate content before you commit or publish with publish:github.
steps:
- id: fetch-remote-tarball
action: fetch:plain
input:
url: https://codeload.github.com/acme/ui-kit/tar.gz/refs/tags/v2.4.1
targetPath: vendor/ui-kitFetch from a private GitHub archive using a token
Downloads a private repository archive and places it under charts. Pass a token that can read the source, for example a PAT provided as a template parameter or secret.
steps:
- id: fetch-private-charts
action: fetch:plain
input:
url: https://codeload.github.com/acme-internal/helm-charts/zip/refs/heads/main
targetPath: charts
token: ${{ parameters.githubReadToken }}Parameterized content selection for environment overlays
Selects which overlay to fetch using template parameters and writes it to a specific location. Use this to pull environment specific k8s overlays before you publish or push changes.
steps:
- id: fetch-env-overlay
action: fetch:plain
input:
url: ${{ parameters.overlaySource }} # e.g. ./overlays/dev or ./overlays/prod
targetPath: ${{ parameters.overlayTarget }} # e.g. deploy/overlays/dev