README updates

This commit is contained in:
Konrad Pabjan 2020-07-13 14:39:01 +02:00
parent 37d541d232
commit 539315322a
4 changed files with 21 additions and 9 deletions

View file

@ -71,8 +71,7 @@ To maintain the same behavior for `v2`, you can set the `path` to the name of th
# 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:
```
etc/usr/artifacts/
@ -107,6 +106,24 @@ steps:
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
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
View file

@ -6583,7 +6583,7 @@ var Inputs;
})(Inputs = exports.Inputs || (exports.Inputs = {}));
var Outputs;
(function (Outputs) {
Outputs["DownloadPath"] = "downloadPath";
Outputs["DownloadPath"] = "download-path";
})(Outputs = exports.Outputs || (exports.Outputs = {}));
@ -6641,8 +6641,6 @@ function run() {
try {
const name = core.getInput(constants_1.Inputs.Name, { 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();
if (!name) {
// download all artifacts

View file

@ -3,5 +3,5 @@ export enum Inputs {
Path = 'path'
}
export enum Outputs {
DownloadPath = 'downloadPath'
DownloadPath = 'download-path'
}

View file

@ -8,9 +8,6 @@ async function run(): Promise<void> {
const name = core.getInput(Inputs.Name, {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()
if (!name) {
// download all artifacts