mirror of
https://code.forgejo.org/actions/download-artifact.git
synced 2024-12-23 04:06:00 +01:00
Merge pull request #275 from actions/robherley/better-log-msgs
Clarify log messages when using `pattern` or `merge-multiple` params
This commit is contained in:
commit
bb3fa7fd35
2 changed files with 15 additions and 5 deletions
7
dist/index.js
vendored
7
dist/index.js
vendored
|
@ -121113,7 +121113,6 @@ function run() {
|
||||||
artifacts = [targetArtifact];
|
artifacts = [targetArtifact];
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
core.info(`No input name specified, downloading all artifacts. Extra directory with the artifact name will be created for each download`);
|
|
||||||
const listArtifactResponse = yield artifact_1.default.listArtifacts(Object.assign({ latest: true }, options));
|
const listArtifactResponse = yield artifact_1.default.listArtifacts(Object.assign({ latest: true }, options));
|
||||||
artifacts = listArtifactResponse.artifacts;
|
artifacts = listArtifactResponse.artifacts;
|
||||||
core.debug(`Found ${artifacts.length} artifacts in run`);
|
core.debug(`Found ${artifacts.length} artifacts in run`);
|
||||||
|
@ -121123,6 +121122,12 @@ function run() {
|
||||||
artifacts = artifacts.filter(artifact => matcher.match(artifact.name));
|
artifacts = artifacts.filter(artifact => matcher.match(artifact.name));
|
||||||
core.debug(`Filtered from ${listArtifactResponse.artifacts.length} to ${artifacts.length} artifacts`);
|
core.debug(`Filtered from ${listArtifactResponse.artifacts.length} to ${artifacts.length} artifacts`);
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
core.info('No input name or pattern filtered specified, downloading all artifacts');
|
||||||
|
if (!inputs.mergeMultiple) {
|
||||||
|
core.info('An extra directory with the artifact name will be created for each download');
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (artifacts.length) {
|
if (artifacts.length) {
|
||||||
core.info(`Preparing to download the following artifacts:`);
|
core.info(`Preparing to download the following artifacts:`);
|
||||||
|
|
|
@ -75,10 +75,6 @@ async function run(): Promise<void> {
|
||||||
|
|
||||||
artifacts = [targetArtifact]
|
artifacts = [targetArtifact]
|
||||||
} else {
|
} else {
|
||||||
core.info(
|
|
||||||
`No input name specified, downloading all artifacts. Extra directory with the artifact name will be created for each download`
|
|
||||||
)
|
|
||||||
|
|
||||||
const listArtifactResponse = await artifactClient.listArtifacts({
|
const listArtifactResponse = await artifactClient.listArtifacts({
|
||||||
latest: true,
|
latest: true,
|
||||||
...options
|
...options
|
||||||
|
@ -94,6 +90,15 @@ async function run(): Promise<void> {
|
||||||
core.debug(
|
core.debug(
|
||||||
`Filtered from ${listArtifactResponse.artifacts.length} to ${artifacts.length} artifacts`
|
`Filtered from ${listArtifactResponse.artifacts.length} to ${artifacts.length} artifacts`
|
||||||
)
|
)
|
||||||
|
} else {
|
||||||
|
core.info(
|
||||||
|
'No input name or pattern filtered specified, downloading all artifacts'
|
||||||
|
)
|
||||||
|
if (!inputs.mergeMultiple) {
|
||||||
|
core.info(
|
||||||
|
'An extra directory with the artifact name will be created for each download'
|
||||||
|
)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue