-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Open
Labels
Description
Describe the enhancement
Add support for downloading artifacts from other workflows and/or previous workflow runs.
Code Snippet
Adding an optional parameter that defines search criteria would provide the ability to reference other workflows and previous executions as necessary. For example:
// Representative new behavior
const previousWorkflowRunCriteria : WorkflowCriteria = {
branch: 'master',
event: 'push',
status: 'success'
}
const artifactsFromPreviousRunOfThisWorkflow = await artifactClient.downloadAllArtifacts(path, previousWorkflowRunCriteria)
const anotherWorkflowCriteria : WorkflowCriteria = {
owner: 'owenfarrell',
repo: 'vscode-vault',
workflow: 'Build'
}
const artifactsFromAnotherWorkflow = await artifactClient.downloadAllArtifacts(path, anotherWorkflowCriteria)
// Existing behavior
const artifactsFromThisRunOfThisWorkflow = await artifactClient.downloadAllArtifacts(path)
Additional information
Per the report in actions/download-artifact#3, a common use case amongst GitHub Actions users is to download an artifact from a previous run (or from another workflow altogether). This request serves as a precursor to resolving the linked issue above.
billyvg, jcadavez, clementlecorre, Burwin, rellfy and 80 morejluffma and aaronabf