mirror of
https://github.com/actions/download-artifact.git
synced 2025-07-27 08:58:28 +02:00
Add extra option to create a folder during download
This commit is contained in:
parent
1de1dea89c
commit
731ed00a75
8 changed files with 133 additions and 65 deletions
32
README.md
32
README.md
|
@ -44,9 +44,39 @@ steps:
|
|||
run: ls -R
|
||||
working-directory: path/to/artifact
|
||||
```
|
||||
|
||||
Download an artifact and create an extra directory
|
||||
```yaml
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- uses: actions/download-artifact@v2
|
||||
with:
|
||||
name: my-artifact
|
||||
path: path/to/artifact
|
||||
artifact-folder: true
|
||||
|
||||
- name: Display structure of downloaded files
|
||||
run: ls -R
|
||||
working-directory: path/to/artifact
|
||||
```
|
||||
|
||||
If `artifact-folder` is set to `true`. An extra directory denoted by the name of the artifact will be created
|
||||
```
|
||||
path/to/artifact/
|
||||
my-artifact/
|
||||
... contents of my-artifact
|
||||
```
|
||||
|
||||
If `artifact-folder` is set to `false` (the default), there will be no extra folder created
|
||||
```
|
||||
path/to/artifact/
|
||||
... contents of my-artifact
|
||||
```
|
||||
|
||||
# Download All Artifacts
|
||||
|
||||
If the `name` input parameter is not provided, all artifacts will be downloaded. To differentiate between downloaded artifacts, a directory denoted by the artifacts name will be created for each individual artifact.
|
||||
If the `name` input parameter is not provided, all artifacts will be downloaded. To differentiate between downloaded artifacts, a directory denoted by the artifacts name will be created for each individual artifact. Currently the `artifact-folder` input-parameter is not respected when downloading all artifacts.
|
||||
|
||||
Example, if there are two artifacts `Artifact-A` and `Artifact-B`, and the directory is `etc/usr/artifacts/`, the directory structure will look like this:
|
||||
```
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue