This action helps you to download an artifact from another github workflow. The out-of-the-box download artifact action from github only allows you to download artifacts from a job in the current workflow. This action gets around this restriction. The workflow can even be hosted in another github account.
The action downloads the latest artifact from the last successful workflow run executed against the provided branch. Failed workflow runs are ignored. Workflow runs against branches other than the supplied branch are ignored.
NOTE: if you want to download the artifact from a specific pipeline run instance (run id), use the Download artifact from a github workflow run.
To download an artifact from a workflow:
- name: download workflow artifact
uses: benday-inc/download-latest-artifact@main
with:
token: ${{ secrets.TOKEN_WITH_PERMISSIONS }}'
repository_owner: 'benday'
repository_name: 'actionsdemo'
workflow_name: 'my-workflow'
branch_name: 'master'
artifact_name: 'build-output'
download_path: '${{ github.workspace }}/temp'
download_filename: 'actionsdemo-artifact.zip'
- None
token
- github token for the target repositoryrepository_owner
- name of the repository account ownerrepository_name
- name of the repositoryworkflow_name
- name of the workflow that created the artifactbranch_name
- name of the branch that the workflow should run off ofartifact_name
- name of artifact to downloaddownload_path
- location on the agent to download the artifact to.download_filename
- download the artifact file as this filename
- None