This is an automated email from the ASF dual-hosted git repository.
lollipop 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 14e9d556 Use script to check changed files instead for
dorny/paths-filter@v2 in action workflows. (#994)
14e9d556 is described below
commit 14e9d55648deb511ba1bdbf09ee7e296fe5b57ff
Author: Jixiang Jin <[email protected]>
AuthorDate: Wed May 7 19:48:11 2025 +0800
Use script to check changed files instead for dorny/paths-filter@v2 in
action workflows. (#994)
* use script to check changed files instead for dorny/paths-filter@v2
---
.github/workflows/build.yml | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index 45b4782f..4a625946 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -32,7 +32,7 @@ jobs:
REPO_OWNER=${{ github.repository_owner }}
REPO_NAME=${{ github.event.repository.name }}
- # calling GitHub API for changed files in PR
+ # calling GitHub API for changed files in PR, the result is in
string format.
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' ' ')
@@ -44,7 +44,7 @@ jobs:
- name: Check Java changes
id: java
run: |
- if echo "${{ steps.changed_files.outputs.files }}" | grep -qE
'^(java/|pom.xml)'; then
+ if echo "${{ steps.changed_files.outputs.files }}" | tr ' ' '\n'|
grep -qE '^(java/|pom.xml)'; then
echo "::set-output name=java::true"
else
echo "::set-output name=java::false"
@@ -53,7 +53,7 @@ jobs:
- name: Check C++ changes
id: cpp
run: |
- if echo "${{ steps.changed_files.outputs.files }}" | grep -qE
'^cpp/'; then
+ if echo "${{ steps.changed_files.outputs.files }}" | tr ' ' '\n'|
grep -qE '^cpp/'; then
echo "::set-output name=cpp::true"
else
echo "::set-output name=cpp::false"
@@ -62,7 +62,7 @@ jobs:
- name: Check Golang changes
id: golang
run: |
- if echo "${{ steps.changed_files.outputs.files }}" | grep -qE
'^golang/'; then
+ if echo "${{ steps.changed_files.outputs.files }}" | tr ' ' '\n' |
grep -qE '^golang/'; then
echo "::set-output name=golang::true"
else
echo "::set-output name=golang::false"
@@ -71,7 +71,7 @@ jobs:
- name: Check C# changes
id: csharp
run: |
- if echo "${{ steps.changed_files.outputs.files }}" | grep -qE
'^csharp/'; then
+ if echo "${{ steps.changed_files.outputs.files }}" | tr ' ' '\n' |
grep -qE '^csharp/'; then
echo "::set-output name=csharp::true"
else
echo "::set-output name=csharp::false"
@@ -80,7 +80,7 @@ jobs:
- name: Check PHP changes
id: php
run: |
- if echo "${{ steps.changed_files.outputs.files }}" | grep -qE
'^php/'; then
+ if echo "${{ steps.changed_files.outputs.files }}" | tr ' ' '\n' |
grep -qE '^php/'; then
echo "::set-output name=php::true"
else
echo "::set-output name=php::false"
@@ -89,7 +89,7 @@ jobs:
- name: Check Rust changes
id: rust
run: |
- if echo "${{ steps.changed_files.outputs.files }}" | grep -qE
'^rust/'; then
+ if echo "${{ steps.changed_files.outputs.files }}" | tr ' ' '\n' |
grep -qE '^rust/'; then
echo "::set-output name=rust::true"
else
echo "::set-output name=rust::false"
@@ -98,7 +98,7 @@ jobs:
- name: Check Python changes
id: python
run: |
- if echo "${{ steps.changed_files.outputs.files }}" | grep -qE
'^python/'; then
+ if echo "${{ steps.changed_files.outputs.files }}" | tr ' ' '\n' |
grep -qE '^python/'; then
echo "::set-output name=python::true"
else
echo "::set-output name=python::false"
@@ -107,7 +107,7 @@ jobs:
- name: Check Node.js changes
id: nodejs
run: |
- if echo "${{ steps.changed_files.outputs.files }}" | grep -qE
'^nodejs/'; then
+ if echo "${{ steps.changed_files.outputs.files }}" | tr ' ' '\n' |
grep -qE '^nodejs/'; then
echo "::set-output name=nodejs::true"
else
echo "::set-output name=nodejs::false"