Skip to content

β¬‡οΈπŸ“¦πŸš€ Download Artifact Action: Seamlessly download workflow artifacts from across runs or repositories. This action extends actions/download-artifact with additional JSON metadata input for easy handling. Perfect for cross-workflow and cross-repository artifact transfers. Boost your CI/CD efficiency now!

License

Notifications You must be signed in to change notification settings

actions-rindeal/download-artifact

Folders and files

NameName
Last commit message
Last commit date

Latest commit

76ca17a Β· Sep 22, 2024

History

2 Commits
Jul 9, 2024
Sep 22, 2024
Sep 22, 2024

Repository files navigation

β¬‡οΈπŸ“¦πŸš€ Download Artifact Action

This action downloads build artifacts in your GitHub Actions workflow. It's a wrapper around actions/download-artifact with an additional artifact input, which accepts a JSON string with extended artifact metadata.

To be paired with the upload-artifact action, which is again a wrapper around actions/upload-artifact with an additional artifact output that provides the extended artifact metadata JSON string.

🌟 How is this useful?

Both actions together allow you to easily perform cross-workflow-run or even cross-repository artifact transfers with just a single variable being passed around.

πŸ“‹ Usage

- name: "Download artifact"
  id: 'DOWNLOAD'
  uses: 'actions-rindeal/download-artifact@v4'
  with:
    'artifact': ${{ steps['UPLOAD'].outputs['ARTIFACT'] }}
    'path': 'my-artifact'
    # will download the artifact to `${GITHUB_WORKSPACE}/my-artifact`

Example of accessing the metadata props:

env:
  'ARTIFACT_NAME': ${{ fromJSON(steps['DOWNLOAD'].outputs['ARTIFACT']).name }}

πŸ”§ Inputs

Name Description Default
artifact Artifact metadata JSON as output by the actions-rindeal/upload-artifact action ''
name Name of the artifact to download. If unspecified, all artifacts for the run are downloaded. ''
path Destination path. Supports basic tilde expansion. Defaults to $GITHUB_WORKSPACE ''
pattern A glob pattern matching the artifacts that should be downloaded. Ignored if name is specified. ''
merge-multiple When multiple artifacts are matched, this changes the behavior of the destination directories. If true, the downloaded artifacts will be in the same directory specified by path. If false, the downloaded artifacts will be extracted into individual named directories within the specified path. 'false'
github-token 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. ''
repository 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. ''
run-id 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. ''

πŸ“€ Outputs

Name Description Example
download-path Path of artifact download '/home/runner/work/my-repo/my-repo/my-artifact'

πŸ“š Notes

For more details on artifact handling in GitHub Actions, refer to the official documentation.

About

β¬‡οΈπŸ“¦πŸš€ Download Artifact Action: Seamlessly download workflow artifacts from across runs or repositories. This action extends actions/download-artifact with additional JSON metadata input for easy handling. Perfect for cross-workflow and cross-repository artifact transfers. Boost your CI/CD efficiency now!

Topics

Resources

License

Stars

Watchers

Forks