https://github.com/levonet/action-download-last-artifact
Downloads the last created artifact by name, regardless of which workflow or branch it was created in
https://github.com/levonet/action-download-last-artifact
Last synced: about 1 year ago
JSON representation
Downloads the last created artifact by name, regardless of which workflow or branch it was created in
- Host: GitHub
- URL: https://github.com/levonet/action-download-last-artifact
- Owner: levonet
- License: mit
- Created: 2021-04-07T20:23:27.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2021-04-20T20:46:46.000Z (about 5 years ago)
- Last Synced: 2024-10-11T23:05:44.402Z (over 1 year ago)
- Language: JavaScript
- Size: 126 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# GitHub Action: Download last artifact
Downloads the last created artifact by name, regardless of which workflow or branch it was created in.
What is it for? For example:
- You put artifacts in the base branch, and use it in Pull Requests
- Or create artifacts during a release with a tag name in the artifact name.
Then from the next runs you can download the artifact by name.
## Example usage
```yml
steps:
- uses: actions/checkout@v2
- name: Download last artifact
uses: blablacar/action-download-last-artifact@master
with:
name: my-artifact
- name: Display structure of downloaded files
run: ls -R
```
## Inputs
### `name`
**Required** Artifact name.
### `path`
Optional. Destination path.
By default, the artifact is stored in the current directory.
### `token`
Personal access token (PAT) used to fetch the repository. The PAT is configured
with the local git config, which enables your scripts to run authenticated git
commands. The post-job step removes the PAT.
We recommend using a service account with the least permissions necessary.
Also when generating a new PAT, select the least scopes necessary.
[Learn more about creating and using encrypted secrets](https://help.github.com/en/actions/automating-your-workflow-with-github-actions/creating-and-using-encrypted-secrets)
# License
The scripts and documentation in this project are released under the [MIT License](LICENSE)