From 1cbab03e0ef950afbcda18a1147017c03276ac5c Mon Sep 17 00:00:00 2001
From: Sankalp Kotewar <98868223+kotewar@users.noreply.github.com>
Date: Mon, 21 Nov 2022 13:47:05 +0000
Subject: [PATCH] Trying with inputs

---
 action.yml            | 4 ++--
 dist/restore/index.js | 4 ++--
 dist/save/index.js    | 2 +-
 src/constants.ts      | 2 +-
 src/restore.ts        | 2 +-
 5 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/action.yml b/action.yml
index 7034f4e..de8fe31 100644
--- a/action.yml
+++ b/action.yml
@@ -18,7 +18,7 @@ inputs:
     description: 'Fail the workflow if the cache is not found for the given key.'
     required: false
     default: "false"
-  save-cache-on-any-failure:
+  saveCacheOnAnyFailure:
     description: 'Save build cache despite of failure in the job'
     default: 'no'
 outputs:
@@ -28,7 +28,7 @@ runs:
   using: 'node16'
   main: 'dist/restore/index.js'
   post: 'dist/save/index.js'
-  post-if: success() || env.INPUT_SAVE-CACHE-ON-ANY-FAILURE == 'yes'
+  post-if: (success() || (env.INPUT_SAVECACHEONANYFAILURE == 'yes'))
 branding:
   icon: 'archive'
   color: 'gray-dark'
diff --git a/dist/restore/index.js b/dist/restore/index.js
index 3a03c9a..6125dd6 100644
--- a/dist/restore/index.js
+++ b/dist/restore/index.js
@@ -4948,7 +4948,7 @@ var Inputs;
     Inputs["RestoreKeys"] = "restore-keys";
     Inputs["UploadChunkSize"] = "upload-chunk-size";
     Inputs["StrictRestore"] = "strict-restore";
-    Inputs["SaveCacheOnAnyFailure"] = "save-cache-on-any-failure";
+    Inputs["SaveCacheOnAnyFailure"] = "saveCacheOnAnyFailure";
 })(Inputs = exports.Inputs || (exports.Inputs = {}));
 var Outputs;
 (function (Outputs) {
@@ -48991,7 +48991,7 @@ function run() {
             const saveCache = core.getInput(constants_1.Inputs.SaveCacheOnAnyFailure);
             if (saveCache === "yes") {
                 core.saveState(constants_1.State.SaveCache, saveCache);
-                core.info(`Input save-cache-on-any-failure is set to yes, the cache will be saved despite of any failure in the build.`);
+                core.info(`Input saveCacheOnAnyFailure is set to yes, the cache will be saved despite of any failure in the build.`);
                 core.info(core.getState(constants_1.State.SaveCache));
                 core.info(core.getState(constants_1.State.CachePrimaryKey));
             }
diff --git a/dist/save/index.js b/dist/save/index.js
index facaaf8..44abb18 100644
--- a/dist/save/index.js
+++ b/dist/save/index.js
@@ -4948,7 +4948,7 @@ var Inputs;
     Inputs["RestoreKeys"] = "restore-keys";
     Inputs["UploadChunkSize"] = "upload-chunk-size";
     Inputs["StrictRestore"] = "strict-restore";
-    Inputs["SaveCacheOnAnyFailure"] = "save-cache-on-any-failure";
+    Inputs["SaveCacheOnAnyFailure"] = "saveCacheOnAnyFailure";
 })(Inputs = exports.Inputs || (exports.Inputs = {}));
 var Outputs;
 (function (Outputs) {
diff --git a/src/constants.ts b/src/constants.ts
index 03440d3..2233f77 100644
--- a/src/constants.ts
+++ b/src/constants.ts
@@ -4,7 +4,7 @@ export enum Inputs {
     RestoreKeys = "restore-keys",
     UploadChunkSize = "upload-chunk-size",
     StrictRestore = "strict-restore",
-    SaveCacheOnAnyFailure = "save-cache-on-any-failure"
+    SaveCacheOnAnyFailure = "saveCacheOnAnyFailure"
 }
 
 export enum Outputs {
diff --git a/src/restore.ts b/src/restore.ts
index 3673ace..f7fb731 100644
--- a/src/restore.ts
+++ b/src/restore.ts
@@ -40,7 +40,7 @@ async function run(): Promise<void> {
         if (saveCache === "yes") {
             core.saveState(State.SaveCache, saveCache);
             core.info(
-                `Input save-cache-on-any-failure is set to yes, the cache will be saved despite of any failure in the build.`
+                `Input saveCacheOnAnyFailure is set to yes, the cache will be saved despite of any failure in the build.`
             );
             core.info(core.getState(State.SaveCache));
             core.info(core.getState(State.CachePrimaryKey));