Downloads single file and places it in the workspace.
Input Schema
| Property | Type | Description | Required |
|---|---|---|---|
| url | string | Relative path or absolute URL pointing to the single file 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 file as. |
Output Schema
Usage Examples
Add a company-standard LICENSE file from a central repository
Fetches a LICENSE from a central standards repo and places it in the project root. Use after generating the skeleton with fetch:template and before publishing with publish:github.
steps:
- id: fetch-license
action: fetch:plain:file
input:
url: https://raw.githubusercontent.com/acme-org/standards/main/licenses/Apache-2.0.txt
targetPath: LICENSECopy a template env file within the workspace to an environment-specific name
Copies a local file from the workspace using a relative path, useful when a template includes a single .env example that should be duplicated for a specific environment.
steps:
- id: copy-env-template
action: fetch:plain:file
input:
url: ./templates/env/.env.example
targetPath: config/.env.${{ parameters.environment }}Fetch a private Helm values file from GitHub using a token
Downloads an environment-specific Helm values file from a private GitHub repo. Place this after fetch:template so the deploy directory exists.
steps:
- id: fetch-helm-values
action: fetch:plain:file
input:
url: https://raw.githubusercontent.com/acme-org/helm-charts/main/services/${{ parameters.serviceId }}/values-${{ parameters.environment }}.yaml
targetPath: deploy/helm/values.yaml
token: ${{ secrets.githubToken }}Download a versioned utility script from an internal artifact host
Retrieves a specific version of a utility script and places it under scripts. Useful for pinning tool versions during scaffolding.
steps:
- id: get-kube-lint
action: fetch:plain:file
input:
url: https://downloads.acme.internal/tools/kube-lint/${{ parameters.version }}/kube-lint.sh
targetPath: scripts/kube-lint.shInclude a language-specific .gitignore from the GitHub gitignore repository
Adds a .gitignore tailored to the selected language. Run this before committing and publishing with publish:github.
steps:
- id: fetch-gitignore
action: fetch:plain:file
input:
url: https://raw.githubusercontent.com/github/gitignore/main/${{ parameters.language }}.gitignore
targetPath: .gitignore