mirror of
https://code.forgejo.org/actions/download-artifact
synced 2025-07-06 10:15:59 +02:00
Update download-artifact.ts
This commit is contained in:
parent
d6ab5a844b
commit
a64f201980
1 changed files with 10 additions and 2 deletions
|
@ -8,7 +8,14 @@ async function run(): Promise<void> {
|
||||||
try {
|
try {
|
||||||
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 dontextract = core.getInput(Inputs.Dontextract, {required: false})
|
||||||
|
let stayGzipped
|
||||||
|
if(dontextract == "True") {
|
||||||
|
stayGzipped = True
|
||||||
|
} else {
|
||||||
|
stayGzipped = False
|
||||||
|
}
|
||||||
|
|
||||||
let resolvedPath
|
let resolvedPath
|
||||||
// resolve tilde expansions, path.replace only replaces the first occurrence of a pattern
|
// resolve tilde expansions, path.replace only replaces the first occurrence of a pattern
|
||||||
if (path.startsWith(`~`)) {
|
if (path.startsWith(`~`)) {
|
||||||
|
@ -43,7 +50,8 @@ async function run(): Promise<void> {
|
||||||
const downloadResponse = await artifactClient.downloadArtifact(
|
const downloadResponse = await artifactClient.downloadArtifact(
|
||||||
name,
|
name,
|
||||||
resolvedPath,
|
resolvedPath,
|
||||||
downloadOptions
|
downloadOptions,
|
||||||
|
stayGzipped
|
||||||
)
|
)
|
||||||
core.info(
|
core.info(
|
||||||
`Artifact ${downloadResponse.artifactName} was downloaded to ${downloadResponse.downloadPath}`
|
`Artifact ${downloadResponse.artifactName} was downloaded to ${downloadResponse.downloadPath}`
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue