diff --git a/.github/workflows/update_protobufs.yml b/.github/workflows/update_protobufs.yml
index 2732ab760..e7b3c1f40 100644
--- a/.github/workflows/update_protobufs.yml
+++ b/.github/workflows/update_protobufs.yml
@@ -12,6 +12,7 @@ jobs:
           submodules: true
 
       - name: Update submodule
+        if: ${{ github.ref == 'refs/heads/master' }}
         run: |
           git submodule update --remote protobufs