diff --git a/action.yml b/action.yml
index efa8de90..6a9b5ed1 100644
--- a/action.yml
+++ b/action.yml
@@ -40,7 +40,7 @@ runs:
   using: 'node20'
   main: 'dist/setup/index.js'
   post: 'dist/cache-save/index.js'
-  post-if: success()
+  post-if: 'success() && github.event.inputs.cache'
 branding:
   icon: 'code'
   color: 'yellow'