3
0
Fork 0
mirror of https://code.forgejo.org/actions/cache.git synced 2025-04-27 05:35:51 +00:00

Basic implementation

This commit is contained in:
Sankalp Kotewar 2022-11-25 09:16:56 +00:00 committed by GitHub
parent 6babf202a4
commit 69b8227b27
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 320 additions and 174 deletions

View file

@ -27,7 +27,9 @@ async function run(): Promise<void> {
const state = utils.getCacheState();
// Inputs are re-evaluted before the post action, so we want the original key used for restore
const primaryKey = core.getState(State.CachePrimaryKey);
const primaryKey =
core.getState(State.CachePrimaryKey) || core.getInput(Inputs.Key);
if (!primaryKey) {
utils.logWarning(`Error retrieving key from state.`);
return;