mirror of
https://github.com/actions/download-artifact.git
synced 2025-07-26 00:18:30 +02:00
README updates
This commit is contained in:
parent
37d541d232
commit
539315322a
4 changed files with 21 additions and 9 deletions
21
README.md
21
README.md
|
@ -71,8 +71,7 @@ To maintain the same behavior for `v2`, you can set the `path` to the name of th
|
||||||
|
|
||||||
# Download All Artifacts
|
# 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.**
|
||||||
|
|
||||||
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:
|
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:
|
||||||
```
|
```
|
||||||
etc/usr/artifacts/
|
etc/usr/artifacts/
|
||||||
|
@ -107,6 +106,24 @@ steps:
|
||||||
run: ls -R
|
run: ls -R
|
||||||
```
|
```
|
||||||
|
|
||||||
|
# Download path output
|
||||||
|
|
||||||
|
Not sure where your artifact was downloaded to? The `download-path` step output can help you out. Just make sure to be aware of the extra directory that is created if downloading all artifacts (no name specified).
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- uses: actions/download-artifact@v2
|
||||||
|
id: download
|
||||||
|
with:
|
||||||
|
name: 'my-artifact'
|
||||||
|
path: path/to/artifacts
|
||||||
|
|
||||||
|
- name: 'Output download path'
|
||||||
|
run: echo ${{steps.download.outputs.download-path}}
|
||||||
|
```
|
||||||
|
|
||||||
# @actions/artifact package
|
# @actions/artifact package
|
||||||
|
|
||||||
Internally the [@actions/artifact](https://github.com/actions/toolkit/tree/master/packages/artifact) NPM package is used to interact with artifacts. You can find additional documentation there along with all the source code related to artifact download.
|
Internally the [@actions/artifact](https://github.com/actions/toolkit/tree/master/packages/artifact) NPM package is used to interact with artifacts. You can find additional documentation there along with all the source code related to artifact download.
|
||||||
|
|
4
dist/index.js
vendored
4
dist/index.js
vendored
|
@ -6583,7 +6583,7 @@ var Inputs;
|
||||||
})(Inputs = exports.Inputs || (exports.Inputs = {}));
|
})(Inputs = exports.Inputs || (exports.Inputs = {}));
|
||||||
var Outputs;
|
var Outputs;
|
||||||
(function (Outputs) {
|
(function (Outputs) {
|
||||||
Outputs["DownloadPath"] = "downloadPath";
|
Outputs["DownloadPath"] = "download-path";
|
||||||
})(Outputs = exports.Outputs || (exports.Outputs = {}));
|
})(Outputs = exports.Outputs || (exports.Outputs = {}));
|
||||||
|
|
||||||
|
|
||||||
|
@ -6641,8 +6641,6 @@ function run() {
|
||||||
try {
|
try {
|
||||||
const name = core.getInput(constants_1.Inputs.Name, { required: false });
|
const name = core.getInput(constants_1.Inputs.Name, { required: false });
|
||||||
const path = core.getInput(constants_1.Inputs.Path, { required: false });
|
const path = core.getInput(constants_1.Inputs.Path, { required: false });
|
||||||
const testing = path_1.resolve(path);
|
|
||||||
core.info(`Will tilde expansion work... ${testing}`);
|
|
||||||
const artifactClient = artifact.create();
|
const artifactClient = artifact.create();
|
||||||
if (!name) {
|
if (!name) {
|
||||||
// download all artifacts
|
// download all artifacts
|
||||||
|
|
|
@ -3,5 +3,5 @@ export enum Inputs {
|
||||||
Path = 'path'
|
Path = 'path'
|
||||||
}
|
}
|
||||||
export enum Outputs {
|
export enum Outputs {
|
||||||
DownloadPath = 'downloadPath'
|
DownloadPath = 'download-path'
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,9 +8,6 @@ async function run(): Promise<void> {
|
||||||
const name = core.getInput(Inputs.Name, {required: false})
|
const name = core.getInput(Inputs.Name, {required: false})
|
||||||
const path = core.getInput(Inputs.Path, {required: false})
|
const path = core.getInput(Inputs.Path, {required: false})
|
||||||
|
|
||||||
const testing = resolve(path)
|
|
||||||
core.info(`Will tilde expansion work... ${testing}`)
|
|
||||||
|
|
||||||
const artifactClient = artifact.create()
|
const artifactClient = artifact.create()
|
||||||
if (!name) {
|
if (!name) {
|
||||||
// download all artifacts
|
// download all artifacts
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue