mirror of
https://github.com/actions/download-artifact.git
synced 2025-07-24 23:48:29 +02:00
PR feedback
This commit is contained in:
parent
539315322a
commit
10ae4df874
5 changed files with 10 additions and 6 deletions
|
@ -108,7 +108,7 @@ steps:
|
|||
|
||||
# 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).
|
||||
The `download-path` step output contains information regarding where the artifact was downloaded to. This output can be used for a variety of purposes such as logging or as input to other actions. Be aware of the extra directory that is created if downloading all artifacts (no name specified).
|
||||
|
||||
```yaml
|
||||
steps:
|
||||
|
@ -120,10 +120,12 @@ steps:
|
|||
name: 'my-artifact'
|
||||
path: path/to/artifacts
|
||||
|
||||
- name: 'Output download path'
|
||||
- name: 'Echo download path'
|
||||
run: echo ${{steps.download.outputs.download-path}}
|
||||
```
|
||||
|
||||
> Note: The `id` defined in the `download/artifact` step must match the `id` defined in the `echo` step (i.e `steps.[ID].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.
|
||||
|
|
1
dist/index.js
vendored
1
dist/index.js
vendored
|
@ -6662,6 +6662,7 @@ function run() {
|
|||
core.info(`Artifact ${downloadResponse.artifactName} was downloaded to ${downloadResponse.downloadPath}`);
|
||||
}
|
||||
// output the directory that the artifact(s) was/were downloaded to
|
||||
// if no path is provided, an empty string resolves to the current working directory
|
||||
core.setOutput(constants_1.Outputs.DownloadPath, path_1.resolve(path));
|
||||
core.info('Artifact download has finished successfully');
|
||||
}
|
||||
|
|
6
package-lock.json
generated
6
package-lock.json
generated
|
@ -185,9 +185,9 @@
|
|||
"dev": true
|
||||
},
|
||||
"@types/node": {
|
||||
"version": "14.0.22",
|
||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-14.0.22.tgz",
|
||||
"integrity": "sha512-emeGcJvdiZ4Z3ohbmw93E/64jRzUHAItSHt8nF7M4TGgQTiWqFVGB8KNpLGFmUHmHLvjvBgFwVlqNcq+VuGv9g==",
|
||||
"version": "12.12.6",
|
||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-12.12.6.tgz",
|
||||
"integrity": "sha512-FjsYUPzEJdGXjwKqSpE0/9QEh6kzhTAeObA54rn6j3rR4C/mzpI9L0KNfoeASSPMMdxIsoJuCLDWcM/rVjIsSA==",
|
||||
"dev": true
|
||||
},
|
||||
"@types/normalize-package-data": {
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
"devDependencies": {
|
||||
"@actions/artifact": "^0.3.1",
|
||||
"@actions/core": "^1.2.4",
|
||||
"@types/node": "^14.0.22",
|
||||
"@types/node": "^12.12.6",
|
||||
"@typescript-eslint/parser": "^2.30.0",
|
||||
"@zeit/ncc": "^0.22.1",
|
||||
"concurrently": "^5.2.0",
|
||||
|
|
|
@ -38,6 +38,7 @@ async function run(): Promise<void> {
|
|||
)
|
||||
}
|
||||
// output the directory that the artifact(s) was/were downloaded to
|
||||
// if no path is provided, an empty string resolves to the current working directory
|
||||
core.setOutput(Outputs.DownloadPath, resolve(path))
|
||||
core.info('Artifact download has finished successfully')
|
||||
} catch (err) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue