mirror of
https://code.forgejo.org/actions/cache.git
synced 2025-04-21 00:03:58 +08:00
Reverted custom asks implemented and added wrapper
This commit is contained in:
parent
4b5f33df54
commit
11ab7ccfa2
10 changed files with 242 additions and 337 deletions
17
src/restoreOnly.ts
Normal file
17
src/restoreOnly.ts
Normal file
|
@ -0,0 +1,17 @@
|
|||
import * as core from "@actions/core";
|
||||
|
||||
import { Outputs } from "./constants";
|
||||
import run from "./restoreImpl";
|
||||
import * as utils from "./utils/actionUtils";
|
||||
|
||||
async function restoreOnly(): Promise<void> {
|
||||
const cacheKey = await run();
|
||||
if (cacheKey) {
|
||||
// Store the matched cache key in output
|
||||
core.setOutput(Outputs.Key, utils.getCacheState());
|
||||
|
||||
core.info(`Cache restored from key: ${cacheKey}`);
|
||||
}
|
||||
}
|
||||
|
||||
export default restoreOnly;
|
Loading…
Add table
Add a link
Reference in a new issue