From a64f2019802e12f14634e174a8d8eb1a4d9e579c Mon Sep 17 00:00:00 2001 From: Austin Sasko Date: Mon, 14 Mar 2022 15:22:54 -0400 Subject: [PATCH] Update download-artifact.ts --- src/download-artifact.ts | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/download-artifact.ts b/src/download-artifact.ts index b32a7be..31a65ce 100644 --- a/src/download-artifact.ts +++ b/src/download-artifact.ts @@ -8,7 +8,14 @@ async function run(): Promise { try { const name = core.getInput(Inputs.Name, {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 // resolve tilde expansions, path.replace only replaces the first occurrence of a pattern if (path.startsWith(`~`)) { @@ -43,7 +50,8 @@ async function run(): Promise { const downloadResponse = await artifactClient.downloadArtifact( name, resolvedPath, - downloadOptions + downloadOptions, + stayGzipped ) core.info( `Artifact ${downloadResponse.artifactName} was downloaded to ${downloadResponse.downloadPath}`