diff --git a/action.yml b/action.yml
index b0c492b..c24a81c 100644
--- a/action.yml
+++ b/action.yml
@@ -28,7 +28,7 @@ runs:
   using: 'node16'
   main: 'dist/restore/index.js'
   post: 'dist/save/index.js'
-  post-if: success() || save-cache-on-any-failure == 'yes'
+  post-if: success() || env.STATE_SAVE_CACHE == 'yes'
 branding:
   icon: 'archive'
   color: 'gray-dark'