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
#extractTar Source
extractTar :: ExtractTarArgs -> ExceptT Error Aff FilePath
Extract a compressed tar archive. Returns path to the destination directory
#extractXar Source
extractXar :: ExtractXarArgs -> ExceptT Error Aff FilePath
Extract a xar compatible archive. Returns path to the destination directory
#extractZip Source
extractZip :: ExtractZipArgs -> 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
#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
#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
#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
#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