1
0
mirror of https://github.com/pnpm/action-setup.git synced 2026-03-07 08:21:45 +08:00
action-setup/src/cache-restore/index.ts
khai96_ f6cc97e7f4 style: format
* no semicolons
* no star imports
* import order
2025-12-06 11:09:20 +07:00

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