Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Download from a different workflow #501

Open
owenfarrell opened this issue Jun 17, 2020 · 3 comments · May be fixed by #517
Open

Download from a different workflow #501

owenfarrell opened this issue Jun 17, 2020 · 3 comments · May be fixed by #517
Labels
artifact enhancement New feature or request

Comments

@owenfarrell
Copy link

owenfarrell commented Jun 17, 2020

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.

@owenfarrell owenfarrell added the enhancement New feature or request label Jun 17, 2020
@bradennapier
Copy link

https://github.com/bradennapier/eslint-plus-action/blob/master/src/artifacts.ts

Looks like this is more common of a request than I iamgined! Just letting y'all know I needed the same thing and ended up just using the API to do it - some of the fn's i built may be useful to you. I am using them to allow forked PR's to work securely and for retaining small bits of state across the repo.

Feel free to open issue on the repo if you have any questions - took forever to figure out how to get all that done!

@owenfarrell owenfarrell linked a pull request Jul 15, 2020 that will close this issue
@fkirc
Copy link

fkirc commented Sep 19, 2020

This seems to be a duplicate of actions/download-artifact#3; is there any timeline of when something like #517 might be merged?

@owenfarrell
Copy link
Author

This seems to be a duplicate of actions/download-artifact#3

@fkirc - Based on the pattern that download-artifact has used to date, where the action provides a thin layer for environmental interaction and delegates all calls to toolkit, I don't think these are duplicate issues.

This issue essentially serves as a dependency or prerequisite - functionality that needs to be in place in order for download-artifact to implement the "last mile" of capabilities (containerization, environmental variables, etc.).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
artifact enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants