download-artifact/action.yml
Matthias Valvekens 15051941e0
Support downloading artifacts with common prefix
This commit adds the `name-prefix` input parameter to allow downloading
multiple artifacts of which the names share a common prefix.

This is useful for aggregating artifacts produced by matrix runs (e.g.
reports from matrixed test jobs).

Provides a smoother migration path for the use cases in #248.
2023-12-18 00:38:32 +01:00

35 lines
1.5 KiB
YAML

name: 'Download a Build Artifact'
description: 'Download a build artifact that was previously uploaded in the workflow by the upload-artifact action'
author: 'GitHub'
inputs:
name:
description: 'Name of the artifact to download. If unspecified, all artifacts for the run are downloaded,
unless filtered out by name-prefix.'
required: false
name-prefix:
description: 'Download all artifacts starting with this prefix.'
required: false
path:
description: 'Destination path. Supports basic tilde expansion. Defaults to $GITHUB_WORKSPACE'
required: false
github-token:
description: 'The GitHub token used to authenticate with the GitHub API.
This is required when downloading artifacts from a different repository or from a different workflow run.
If this is not specified, the action will attempt to download artifacts from the current repository and the current workflow run.'
required: false
repository:
description: 'The repository owner and the repository name joined together by "/".
If github-token is specified, this is the repository that artifacts will be downloaded from.'
required: false
default: ${{ github.repository }}
run-id:
description: 'The id of the workflow run where the desired download artifact was uploaded from.
If github-token is specified, this is the run that artifacts will be downloaded from.'
required: false
default: ${{ github.run_id }}
outputs:
download-path:
description: 'Path of artifact download'
runs:
using: 'node20'
main: 'dist/index.js'