Skip to content

Commit

Permalink
Add back file cache, and add cache dir to path
Browse files Browse the repository at this point in the history
  • Loading branch information
jasongwartz committed Mar 10, 2024
1 parent 469c5a1 commit 3fd0274
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
7 changes: 5 additions & 2 deletions dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 8 additions & 1 deletion src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,14 @@ export async function run(): Promise<void> {
})

const pklBinaryPath = await tc.downloadTool(asset.data.browser_download_url)
core.addPath(pklBinaryPath)
const cachedPath = await tc.cacheFile(
pklBinaryPath,
'pkl',
'pkl',
pklVersion
)
core.debug(`Wrote pkl to cached path: ${cachedPath}`)
core.addPath(cachedPath)
} catch (error) {
// Fail the workflow run if an error occurs
if (error instanceof Error) core.setFailed(error.message)
Expand Down

0 comments on commit 3fd0274

Please sign in to comment.