diff --git a/.github/actions/ci-rust-setup/action.yml b/.github/actions/ci-rust-setup/action.yml
index 03b548bb..fa2dab82 100644
--- a/.github/actions/ci-rust-setup/action.yml
+++ b/.github/actions/ci-rust-setup/action.yml
@@ -17,6 +17,7 @@ inputs:
 
 runs:
   using: composite
+  if: inputs.cache-name != ''
   steps:
     - name: Get toolchain from input OR rust-toolchain file
       id: gettoolchain
@@ -41,7 +42,6 @@ runs:
         components: ${{ inputs.components }}
     - name: Cache dependencies
       uses: actions/cache@v3
-      if: inputs.cache-name != ''
       with:
         path: |
           ~/.cargo/registry