mirror of
https://code.forgejo.org/actions/cache.git
synced 2025-06-08 23:41:17 +08:00
Renamed variables and added tests
This commit is contained in:
parent
d91f5bd2fd
commit
3d4af52c52
16 changed files with 810 additions and 988 deletions
|
@ -25,11 +25,7 @@ async function restoreImpl(
|
|||
}
|
||||
|
||||
const primaryKey = core.getInput(Inputs.Key, { required: true });
|
||||
stateProvider.setState(
|
||||
State.CachePrimaryKey,
|
||||
primaryKey,
|
||||
Outputs.InputtedKey
|
||||
);
|
||||
stateProvider.setState(State.CachePrimaryKey, primaryKey);
|
||||
|
||||
const restoreKeys = utils.getInputAsArray(Inputs.RestoreKeys);
|
||||
const cachePaths = utils.getInputAsArray(Inputs.Path, {
|
||||
|
@ -54,11 +50,7 @@ async function restoreImpl(
|
|||
}
|
||||
|
||||
// Store the matched cache key in states
|
||||
stateProvider.setState(
|
||||
State.CacheMatchedKey,
|
||||
cacheKey,
|
||||
Outputs.MatchedKey
|
||||
);
|
||||
stateProvider.setState(State.CacheMatchedKey, cacheKey);
|
||||
|
||||
const isExactKeyMatch = utils.isExactKeyMatch(
|
||||
core.getInput(Inputs.Key, { required: true }),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue