Module

GitHub.Actions.ToolCache

Package
purescript-github-actions-toolkit
Repository
purescript-contrib/purescript-github-actions-toolkit

Exports functions from the @actions/tool-cache module provided by GitHub https://github.com/actions/toolkit/tree/main/packages/tool-cache

#downloadTool Source

downloadTool :: DownloadToolArgs -> ExceptT Error Aff FilePath

Download a tool from an url and stream it into a file

#downloadTool' Source

downloadTool' :: String -> ExceptT Error Aff FilePath

Download a tool from an url and stream it into a file

#DownloadToolArgs Source

type DownloadToolArgs = { auth :: Maybe String, dest :: Maybe FilePath, url :: String }

url: url of tool to download dest: path to download tool. Defaults to randomly generated path auth: authorization header

#extract7z Source

extract7z :: Extract7zArgs -> ExceptT Error Aff FilePath

Extract a .7z file. Returns path to the destination directory

#extract7z' Source

extract7z' :: FilePath -> ExceptT Error Aff FilePath

Extract a .7z file. Returns path to the destination directory

#Extract7zArgs Source

type Extract7zArgs = { _7zPath :: Maybe FilePath, dest :: Maybe FilePath, file :: FilePath }

file: path to the .7z file dest: destination directory. Optional. _7zPath: path to 7zr.exe. Optional, for long path support.

#extractTar Source

extractTar :: ExtractTarArgs -> ExceptT Error Aff FilePath

Extract a compressed tar archive. Returns path to the destination directory

#extractTar' Source

extractTar' :: FilePath -> ExceptT Error Aff FilePath

Extract a compressed tar archive. Returns path to the destination directory

#ExtractTarArgs Source

type ExtractTarArgs = { dest :: Maybe FilePath, file :: FilePath, flags :: Maybe (Array String) }

file: path to the tar dest: destination directory. Defaults to randomly generated path flags: flags for the tar command to use for extraction. Defaults to 'xz' (extracting gzipped tars).

#extractXar Source

extractXar :: ExtractXarArgs -> ExceptT Error Aff FilePath

Extract a xar compatible archive. Returns path to the destination directory

#extractXar' Source

extractXar' :: FilePath -> ExceptT Error Aff FilePath

Extract a xar compatible archive. Returns path to the destination directory

#ExtractXarArgs Source

type ExtractXarArgs = { dest :: Maybe FilePath, file :: FilePath, flags :: Maybe (Array String) }

file: path to the archive dest: destination directory. Defaults to randomly generated path flags: flags for the xar

#extractZip Source

extractZip :: ExtractZipArgs -> ExceptT Error Aff FilePath

Extract a zip. Returns path to the destination directory

#extractZip' Source

extractZip' :: FilePath -> ExceptT Error Aff FilePath

Extract a zip. Returns path to the destination directory

#ExtractZipArgs Source

type ExtractZipArgs = { dest :: Maybe FilePath, file :: FilePath }

file: path to the zip dest: destination directory. Defaults to randomly generated path

#cacheDir Source

cacheDir :: CacheDirArgs -> ExceptT Error Aff FilePath

Caches a directory and installs it into the tool cacheDir

#cacheDir' Source

cacheDir' :: { sourceDir :: String, tool :: String, version :: String } -> ExceptT Error Aff FilePath

Caches a directory and installs it into the tool cacheDir

#CacheDirArgs Source

type CacheDirArgs = { arch :: Maybe String, sourceDir :: String, tool :: String, version :: String }

sourceDir: the directory to cache into tools tool: tool name version: version of the tool. semver format architecture of the tool. Defaults to machine architecture

#cacheFile Source

cacheFile :: CacheFileArgs -> ExceptT Error Aff FilePath

Caches a downloaded file (GUID) and installs it into the tool cache with a given targetName

#cacheFile' Source

cacheFile' :: { sourceFile :: FilePath, targetFile :: FilePath, tool :: String, version :: String } -> ExceptT Error Aff FilePath

Caches a downloaded file (GUID) and installs it into the tool cache with a given targetName

#CacheFileArgs Source

type CacheFileArgs = { arch :: Maybe String, sourceFile :: FilePath, targetFile :: FilePath, tool :: String, version :: String }

sourceFile: the file to cache into tools. Typically a result of downloadTool which is a guid targetFile: the name of the file name in the tools directory tool: tool name version: version of the tool. semver format arch: architecture of the tool. Defaults to machine architecture

#find Source

find :: FindArgs -> ExceptT Error Effect (Maybe FilePath)

Finds the path to a tool version in the local installed tool cache

#find' Source

find' :: { toolName :: String, versionSpec :: String } -> ExceptT Error Effect (Maybe FilePath)

Finds the path to a tool version in the local installed tool cache

#FindArgs Source

type FindArgs = { arch :: Maybe String, toolName :: String, versionSpec :: String }

toolName: name of the tool version: version of the tool. arch: architecture of the tool. Defaults to machine architecture

#findAllVersions Source

findAllVersions :: FindAllVersionsArgs -> ExceptT Error Effect (Array FilePath)

Finds the paths to all versions of a tool that are installed in the local tool cache

#findAllVersions' Source

findAllVersions' :: String -> ExceptT Error Effect (Array FilePath)

Finds the paths to all versions of a tool that are installed in the local tool cache

#FindAllVersionsArgs Source

type FindAllVersionsArgs = { arch :: Maybe String, toolName :: String }

toolName: name of the tool arch: architecture of the tool. Defaults to machine architecture

#getManifestFromRepo Source

getManifestFromRepo :: GetManifestFromRepoArgs -> ExceptT Error Aff (Array IToolRelease)

Get list of releases from a repository

#getManifestFromRepo' Source

getManifestFromRepo' :: { owner :: String, repo :: String } -> ExceptT Error Aff (Array IToolRelease)

Get list of releases from a repository

#GetManifestFromRepoArgs Source

type GetManifestFromRepoArgs = { auth :: Maybe String, branch :: Maybe String, owner :: String, repo :: String }

owner: repository owner repo: repository name auth: auth token branch: branch of the repository. Defaults to 'master'

#findFromManifest Source

findFromManifest :: FindFromManifestArgs -> ExceptT Error Aff (Maybe IToolRelease)

Search list of releases from a repository

#FindFromManifestArgs Source

type FindFromManifestArgs = { archFilter :: Maybe String, manifest :: Array IToolRelease, stable :: Boolean, versionSpec :: String }

versionSpec: version to search for stable: whether or not the release is stable manifest: manifests to search archFilter: architecture filter. Defaults to machine architecture

#IToolRelease Source

type IToolRelease = { files :: Array IToolReleaseFile, releaseUrl :: String, stable :: Boolean, version :: String }

Details for a release

#IToolReleaseFile Source

type IToolReleaseFile = { arch :: String, downloadUrl :: String, filename :: String, platform :: String, platformVersion :: Maybe String }

Details for a release file