improve bazel setup
diff --git a/.github/install_bazel.sh b/.github/install_bazel.sh
index a1693b8..471ff2b 100644
--- a/.github/install_bazel.sh
+++ b/.github/install_bazel.sh
@@ -4,7 +4,7 @@
     arch="arm64"
   fi
   echo "Downloading $arch Bazel binary from GitHub releases."
-  curl -L -o $HOME/bin/bazel --create-dirs "https://github.com/bazelbuild/bazel/releases/download/8.2.0/bazel-8.2.0-linux-$arch"
+  curl -L -o $HOME/bin/bazel --create-dirs "https://github.com/bazelbuild/bazel/releases/download/8.2.1/bazel-8.2.1-linux-$arch"
   chmod +x $HOME/bin/bazel
 else
   # Bazel is installed for the correct architecture
diff --git a/.github/workflows/bazel.yml b/.github/workflows/bazel.yml
index ab94f16..95161cf 100644
--- a/.github/workflows/bazel.yml
+++ b/.github/workflows/bazel.yml
@@ -21,15 +21,11 @@
     steps:
     - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
 
-    - name: mount bazel cache
-      uses: actions/cache@8b402f58fbc84540c8b491a91e594a4576fec3d7 # v5.0.2
-      env:
-        cache-name: bazel-cache
+    - uses: bazel-contrib/setup-bazel@0.18.0
       with:
-        path: "~/.cache/bazel"
-        key: ${{ env.cache-name }}-${{ matrix.os }}-${{ github.ref }}
-        restore-keys: |
-          ${{ env.cache-name }}-${{ matrix.os }}-main
+        bazelisk-cache: true
+        disk-cache: ${{ github.workflow }}
+        respository-cache: true
 
     - name: build
       run: |