From af961fd36620054a78bd5d7c73406e017403163d Mon Sep 17 00:00:00 2001 From: Sankalp Kotewar <98868223+kotewar@users.noreply.github.com> Date: Mon, 14 Nov 2022 12:34:01 +0000 Subject: [PATCH] Updated save primary key fetch --- src/save.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/save.ts b/src/save.ts index 7cb4aac..d30f553 100644 --- a/src/save.ts +++ b/src/save.ts @@ -27,8 +27,8 @@ async function run(): Promise { 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.getInput(Inputs.Key); + const primaryKey = + core.getState(State.CachePrimaryKey) || core.getInput(Inputs.Key); if (!primaryKey) { utils.logWarning(`Error retrieving key from state.`); return;