Skip to content

Download from a different workflow #501

@owenfarrell

Description

@owenfarrell

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions