[MINOR UPDATE] Upgrade Actions (#2894)

diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 833f3d4..39c3fc0 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -29,6 +29,7 @@
   build:
     name: Main Build
     runs-on: ubuntu-latest
+    if: github.repository == 'apache/drill'
     timeout-minutes: 150
     strategy:
       matrix:
@@ -43,7 +44,7 @@
       - name: Checkout
         uses: actions/checkout@v4
       - name: Setup java
-        uses: actions/setup-java@v3
+        uses: actions/setup-java@v4
         with:
           distribution: 'temurin'
           java-version: ${{ matrix.java }}
@@ -72,18 +73,19 @@
   checkstyle_protobuf:
     name: Run checkstyle and generate protobufs
     runs-on: ubuntu-latest
+    if: github.repository == 'apache/drill'
     steps:
       - name: Checkout
         uses: actions/checkout@v4
       - name: Setup java
-        uses: actions/setup-java@v3
+        uses: actions/setup-java@v4
         with:
           distribution: 'temurin'
           java-version: '8'
           cache: 'maven'
       # Caches built protobuf library
       - name: Cache protobufs
-        uses: actions/cache@v3
+        uses: actions/cache@v4
         with:
           path: ~/protobuf
           key: ${{ runner.os }}-protobuf
diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml
index 3af5fef..65155dc 100644
--- a/.github/workflows/codeql-analysis.yml
+++ b/.github/workflows/codeql-analysis.yml
@@ -42,6 +42,7 @@
   analyze:
     name: Analyze
     runs-on: ubuntu-latest
+    if: github.repository == 'apache/drill'
     permissions:
       actions: read
       contents: read
diff --git a/.github/workflows/publish-snapshot.yml b/.github/workflows/publish-snapshot.yml
index 4350d3f..135d711 100644
--- a/.github/workflows/publish-snapshot.yml
+++ b/.github/workflows/publish-snapshot.yml
@@ -27,11 +27,12 @@
   publish:
     name: Publish snapshot artifacts
     runs-on: ubuntu-latest
+    if: github.repository == 'apache/drill'
     steps:
       - name: Checkout
         uses: actions/checkout@v4
       - name: Cache Maven Repository
-        uses: actions/cache@v2
+        uses: actions/cache@v4
         with:
           path: ~/.m2/repository
           key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}