/
fscourge
/
action-setup
Обзор
Документация
Войти
/
fscourge
/
action-setup
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
src/cache-save/run.ts
18 строк
541 B
Jeremiasz Major
feat: store caching (#188)
08 дек 2025, 00:16
Не верифицирован
08 дек 2025, 00:16
e94b270
Код
Авторство
О чём код?
import { saveCache } from '@actions/cache' import { getState, info } from '@actions/core' export async function runSaveCache() { const state = getState('cache_restored_key') const primaryKey = getState('cache_primary_key') const cachePath = getState('cache_path') if (primaryKey === state) { info(`Cache hit occurred on the primary key ${primaryKey}, not saving cache.`) return } const cacheId = await saveCache([cachePath], primaryKey) if (cacheId == -1) return info(`Cache saved with the key: ${primaryKey}`) }