mirror of
https://github.com/pnpm/action-setup.git
synced 2026-02-24 13:43:08 +08:00
* add pnpm store caching * style: format * no semicolons * no star imports * import order * style: no star imports --------- Co-authored-by: khai96_ <hvksmr1996@gmail.com>
20 lines
496 B
TypeScript
20 lines
496 B
TypeScript
import { isFeatureAvailable } from '@actions/cache'
|
|
import { endGroup, startGroup, warning } from '@actions/core'
|
|
import { Inputs } from '../inputs'
|
|
import { runRestoreCache } from './run'
|
|
|
|
export async function restoreCache(inputs: Inputs) {
|
|
if (!inputs.cache) return
|
|
|
|
if (!isFeatureAvailable()) {
|
|
warning('Cache is not available, skipping cache restoration')
|
|
return
|
|
}
|
|
|
|
startGroup('Restoring cache...')
|
|
await runRestoreCache(inputs)
|
|
endGroup()
|
|
}
|
|
|
|
export default restoreCache
|