export async function downloadKubeconform()

in src/kubeconform/kubeconform.ts [39:67]


export async function downloadKubeconform(): Promise<string> {
   const runnerArch = getKubeconformArch()
   const downloadPath = await toolCache.downloadTool(
      getKubeconformDownloadUrl(runnerArch)
   )

   // extract from download
   let extractedPath
   switch (os.type()) {
      case 'Linux':
      case 'Darwin':
         const newPath = path.join(path.dirname(downloadPath), 'tool.tar.gz')
         await io.cp(downloadPath, newPath)
         extractedPath = await toolCache.extractTar(newPath)
         break
      case 'Windows_NT':
      default:
         extractedPath = await toolCache.extractZip(downloadPath)
   }

   // get and make executable
   const kubeconformPath = path.join(
      extractedPath,
      TOOL_NAME + getExecutableExtension()
   )
   fs.chmodSync(kubeconformPath, '755')
   core.addPath(extractedPath)
   return kubeconformPath
}