mirror of
https://github.com/pnpm/action-setup.git
synced 2025-12-13 16:03:30 +08:00
feat: store caching (#188)
* add pnpm store caching * style: format * no semicolons * no star imports * import order * style: no star imports --------- Co-authored-by: khai96_ <hvksmr1996@gmail.com>
This commit is contained in:
15
src/cache-save/index.ts
Normal file
15
src/cache-save/index.ts
Normal file
@@ -0,0 +1,15 @@
|
||||
import { setFailed } from '@actions/core'
|
||||
import { Inputs } from '../inputs'
|
||||
import { runSaveCache } from './run'
|
||||
|
||||
export async function saveCache(inputs: Inputs) {
|
||||
if (!inputs.cache) return
|
||||
|
||||
try {
|
||||
await runSaveCache()
|
||||
} catch (error) {
|
||||
setFailed((error as Error).message)
|
||||
}
|
||||
}
|
||||
|
||||
export default saveCache
|
||||
Reference in New Issue
Block a user