This is an automated email from the ASF dual-hosted git repository.

lizhimin pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/rocketmq-clients.git


The following commit(s) were added to refs/heads/master by this push:
     new b6fc23ba Use script to check changed files instead for 
dorny/paths-filter@v2 in action workflows (#993)
b6fc23ba is described below

commit b6fc23ba9197a1f679095aa188c30d66a69d404d
Author: Jixiang Jin <lolli...@apache.org>
AuthorDate: Wed May 7 13:56:30 2025 +0800

    Use script to check changed files instead for dorny/paths-filter@v2 in 
action workflows (#993)
---
 .github/workflows/build.yml | 130 ++++++++++++++++++++++++++++++++++----------
 java/README.md              |   2 +-
 2 files changed, 102 insertions(+), 30 deletions(-)

diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index 5c405302..45b4782f 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -9,37 +9,109 @@ on:
 jobs:
   paths-filter:
     runs-on: ubuntu-latest
+    permissions:
+      contents: read
     outputs:
-      java: ${{ steps.filter.outputs.java }}
-      cpp: ${{ steps.filter.outputs.cpp }}
-      golang: ${{ steps.filter.outputs.golang }}
-      csharp: ${{ steps.filter.outputs.csharp }}
-      php: ${{ steps.filter.outputs.php }}
-      rust: ${{ steps.filter.outputs.rust }}
-      python: ${{ steps.filter.outputs.python }}
-      nodejs: ${{ steps.filter.outputs.nodejs }}
+      java: ${{ steps.java.outputs.java }}
+      cpp: ${{ steps.cpp.outputs.cpp }}
+      golang: ${{ steps.golang.outputs.golang }}
+      csharp: ${{ steps.csharp.outputs.csharp }}
+      php: ${{ steps.php.outputs.php }}
+      rust: ${{ steps.rust.outputs.rust }}
+      python: ${{ steps.python.outputs.python }}
+      nodejs: ${{ steps.nodejs.outputs.nodejs }}
     steps:
-      - uses: actions/checkout@v2
-      - uses: dorny/paths-filter@v2
-        id: filter
-        with:
-          filters: |
-            java:
-              - 'java/**'
-            cpp:
-              - 'cpp/**'
-            golang:
-              - 'golang/**'
-            csharp:
-              - 'csharp/**'
-            php:
-              - 'php/**'
-            rust:
-              - 'rust/**'
-            python:
-              - 'python/**'
-            nodejs:
-              - 'nodejs/**'
+      - uses: actions/checkout@v4
+      - name: Get changed files (Push/Pull Request)
+        id: changed_files
+        env:
+          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+        run: |
+          if [ "${{ github.event_name }}" = "pull_request" ]; then
+            PR_NUMBER=${{ github.event.pull_request.number }}
+            REPO_OWNER=${{ github.repository_owner }}
+            REPO_NAME=${{ github.event.repository.name }}
+
+            # calling GitHub API for changed files in PR
+            CHANGED_FILES=$(curl -s -H "Authorization: Bearer $GITHUB_TOKEN" \
+              
"https://api.github.com/repos/$REPO_OWNER/$REPO_NAME/pulls/$PR_NUMBER/files"; | \
+              jq -r '.[].filename' | tr '\n' ' ')
+          else
+            CHANGED_FILES=$(git diff --name-only HEAD~1 HEAD)
+          fi
+          echo "::set-output name=files::$CHANGED_FILES"
+
+      - name: Check Java changes
+        id: java
+        run: |
+          if echo "${{ steps.changed_files.outputs.files }}" | grep -qE 
'^(java/|pom.xml)'; then
+            echo "::set-output name=java::true"
+          else
+            echo "::set-output name=java::false"
+          fi
+
+      - name: Check C++ changes
+        id: cpp
+        run: |
+          if echo "${{ steps.changed_files.outputs.files }}" | grep -qE 
'^cpp/'; then
+            echo "::set-output name=cpp::true"
+          else
+            echo "::set-output name=cpp::false"
+          fi
+
+      - name: Check Golang changes
+        id: golang
+        run: |
+          if echo "${{ steps.changed_files.outputs.files }}" | grep -qE 
'^golang/'; then
+            echo "::set-output name=golang::true"
+          else
+            echo "::set-output name=golang::false"
+          fi
+
+      - name: Check C# changes
+        id: csharp
+        run: |
+          if echo "${{ steps.changed_files.outputs.files }}" | grep -qE 
'^csharp/'; then
+            echo "::set-output name=csharp::true"
+          else
+            echo "::set-output name=csharp::false"
+          fi
+
+      - name: Check PHP changes
+        id: php
+        run: |
+          if echo "${{ steps.changed_files.outputs.files }}" | grep -qE 
'^php/'; then
+            echo "::set-output name=php::true"
+          else
+            echo "::set-output name=php::false"
+          fi
+
+      - name: Check Rust changes
+        id: rust
+        run: |
+          if echo "${{ steps.changed_files.outputs.files }}" | grep -qE 
'^rust/'; then
+            echo "::set-output name=rust::true"
+          else
+            echo "::set-output name=rust::false"
+          fi
+
+      - name: Check Python changes
+        id: python
+        run: |
+          if echo "${{ steps.changed_files.outputs.files }}" | grep -qE 
'^python/'; then
+            echo "::set-output name=python::true"
+          else
+            echo "::set-output name=python::false"
+          fi
+
+      - name: Check Node.js changes
+        id: nodejs
+        run: |
+          if echo "${{ steps.changed_files.outputs.files }}" | grep -qE 
'^nodejs/'; then
+            echo "::set-output name=nodejs::true"
+          else
+            echo "::set-output name=nodejs::false"
+          fi
   java-build:
     needs: [paths-filter]
     if: ${{ needs.paths-filter.outputs.java == 'true' }}
diff --git a/java/README.md b/java/README.md
index e1c0cf56..d2bde841 100644
--- a/java/README.md
+++ b/java/README.md
@@ -65,7 +65,7 @@ We picked [Logback](https://logback.qos.ch/) and shaded it 
into the client imple
 
 The following logging parameters are all supported for specification by JVM 
system parameters (for example, `java -Drocketmq.log.level=INFO -jar 
foobar.jar`) or environment variables.
 
-* `rocketmq.log.level`: log output level, default is INFO.
+* `rocketmq.log.level`: the log output level, default is INFO.
 * `rocketmq.log.root`: the root directory of the log output, default is 
`$HOME/logs/rocketmq`, so the full path is 
`$HOME/logs/rocketmq/rocketmq-client.log`.
 * `rocketmq.log.file.maxIndex`: the maximum number of log files to keep, 
default is 10 (the size of a single log file is limited to 64 MB, no adjustment 
is supported now).
 

Reply via email to