
GitHub Repositories DownloadArchive
CertifiedDownload a repository archive
GitHub Repositories DownloadArchive
Download a repository archive
Downloads a GitHub repository archive for a commit SHA, branch or tag and streams it to Kestra internal storage. When ref is omitted, the repository default branch is used. The token needs the contents: read permission. It is optional for public repositories, which are then subject to GitHub's anonymous rate limit.
type: io.kestra.plugin.github.repositories.DownloadArchiveExamples
Download a commit archive with a GitHub App installation token.
id: github_download_archive
namespace: company.team
tasks:
- id: github_app_token
type: io.kestra.plugin.github.auth.AppToken
clientId: "{{ secret('GITHUB_APP_CLIENT_ID') }}"
installationId: "52068731"
privateKey: "{{ secret('GITHUB_APP_PRIVATE_KEY') }}"
- id: download_archive
type: io.kestra.plugin.github.repositories.DownloadArchive
appInstallationToken: "{{ outputs.github_app_token.token }}"
repository: kestra-io/kestra
ref: a1b2c3d4e5f6789012345678901234567890abcd
format: TAR_GZ
- id: log_archive
type: io.kestra.plugin.core.log.Log
message: "Stored {{ outputs.download_archive.ref }} archive at {{ outputs.download_archive.uri }} ({{ outputs.download_archive.size }} bytes)"
Download a branch or tag as a zip archive.
id: github_download_zip
namespace: company.team
tasks:
- id: download_archive
type: io.kestra.plugin.github.repositories.DownloadArchive
oauthToken: "{{ secret('GITHUB_ACCESS_TOKEN') }}"
repository: kestra-io/kestra
ref: develop
format: ZIP
Properties
repository *string
Target repository
Repository in owner/repo format to download.
appInstallationToken string
GitHub App installation token
Installation access token generated by a GitHub App. Use this for repository-scoped app access instead of a user token.
assets
Assets this task consumes as inputs or produces as outputs, for lineage tracking and the asset graph (Enterprise Edition). A flow declaring this property on a task is rejected in the open-source edition.
io.kestra.core.models.assets.AssetsDeclaration
IGNOREFAILWARNAsset failure behavior
Behavior applied to the task state when a declared asset fails to render, emit, or be persisted (e.g. a lock conflict): FAIL escalates it to FAILED, WARN (default) warns it if it would otherwise succeed, IGNORE leaves the state untouched.
Whether to auto-register assets referenced dynamically at runtime that are not statically declared in inputs or outputs.
The assets consumed as inputs.
io.kestra.core.models.assets.AssetIdentifier
1The assets produced as outputs.
io.kestra.plugin.ee.assets.Dataset
1150{}1150io.kestra.plugin.ee.assets.File
1150{}1150io.kestra.plugin.ee.assets.Table
1150{}1150io.kestra.plugin.ee.assets.VM
1150{}1150io.kestra.core.models.assets.External
1150{}1150io.kestra.core.models.assets.Custom
11501Custom asset type
{}1150endpoint string
GitHub API endpoint
GitHub or GitHub Enterprise API base URL such as https://api.github.com or https://ghe.acme.com/api/v3. Set this when targeting GitHub Enterprise or a non-default API endpoint.
format string
ZIPTAR_GZZIPArchive format
ZIP stores a zipball as .zip. TAR_GZ stores GitHub's gzip-compressed tarball as .tar.gz. Defaults to ZIP.
jwtToken string
GitHub JWT token
GitHub App JWT used for app-level authentication. Use this when the task should authenticate as the app rather than a user.
login string
GitHub login
GitHub login used with oauthToken for authenticated requests. Leave unset when authenticating with jwtToken or appInstallationToken.
oauthToken string
GitHub OAuth token
GitHub personal access token used for authenticated requests. Can be used alone or with login.
ref string
Git ref
Branch, tag or commit SHA to archive. Defaults to the repository default branch when unset.
Outputs
ref string
Resolved ref
Branch, tag or commit SHA that was archived. The repository default branch when ref is omitted.
size integer
Archive size
Size of the stored archive in bytes.
uri string
uriArchive URI
Kestra internal storage URI of the downloaded archive.